diff options
Diffstat (limited to '')
| -rw-r--r-- | client.c | 44 |
1 files changed, 2 insertions, 42 deletions
| @@ -83,24 +83,6 @@ setclientstate(Client *c, long state) { | |||
| 83 | PropModeReplace, (unsigned char *)data, 2); | 83 | PropModeReplace, (unsigned char *)data, 2); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | static void | ||
| 87 | togglemax(Client *c) { | ||
| 88 | XEvent ev; | ||
| 89 | |||
| 90 | if(c->isfixed) | ||
| 91 | return; | ||
| 92 | if((c->ismax = !c->ismax)) { | ||
| 93 | c->rx = c->x; | ||
| 94 | c->ry = c->y; | ||
| 95 | c->rw = c->w; | ||
| 96 | c->rh = c->h; | ||
| 97 | resize(c, wax, way, waw - 2 * BORDERPX, wah - 2 * BORDERPX, True); | ||
| 98 | } | ||
| 99 | else | ||
| 100 | resize(c, c->rx, c->ry, c->rw, c->rh, True); | ||
| 101 | while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); | ||
| 102 | } | ||
| 103 | |||
| 104 | static int | 86 | static int |
| 105 | xerrordummy(Display *dsply, XErrorEvent *ee) { | 87 | xerrordummy(Display *dsply, XErrorEvent *ee) { |
| 106 | return 0; | 88 | return 0; |
| @@ -171,7 +153,7 @@ focus(Client *c) { | |||
| 171 | } | 153 | } |
| 172 | 154 | ||
| 173 | void | 155 | void |
| 174 | killclient(Arg *arg) { | 156 | killclient(Arg arg) { |
| 175 | if(!sel) | 157 | if(!sel) |
| 176 | return; | 158 | return; |
| 177 | if(isprotodel(sel)) | 159 | if(isprotodel(sel)) |
| @@ -303,7 +285,7 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) { | |||
| 303 | } | 285 | } |
| 304 | 286 | ||
| 305 | void | 287 | void |
| 306 | toggleversatile(Arg *arg) { | 288 | toggleversatile(Arg arg) { |
| 307 | if(!sel || lt->arrange == versatile) | 289 | if(!sel || lt->arrange == versatile) |
| 308 | return; | 290 | return; |
| 309 | sel->isversatile = !sel->isversatile; | 291 | sel->isversatile = !sel->isversatile; |
| @@ -402,25 +384,3 @@ unmanage(Client *c) { | |||
| 402 | XUngrabServer(dpy); | 384 | XUngrabServer(dpy); |
| 403 | lt->arrange(); | 385 | lt->arrange(); |
| 404 | } | 386 | } |
| 405 | |||
| 406 | void | ||
| 407 | zoom(Arg *arg) { | ||
| 408 | unsigned int n; | ||
| 409 | Client *c; | ||
| 410 | |||
| 411 | if(!sel) | ||
| 412 | return; | ||
| 413 | if(sel->isversatile || (lt->arrange == versatile)) { | ||
| 414 | togglemax(sel); | ||
| 415 | return; | ||
| 416 | } | ||
| 417 | for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) | ||
| 418 | n++; | ||
| 419 | if((c = sel) == nexttiled(clients)) | ||
| 420 | if(!(c = nexttiled(c->next))) | ||
| 421 | return; | ||
| 422 | detach(c); | ||
| 423 | attach(c); | ||
| 424 | focus(c); | ||
| 425 | lt->arrange(); | ||
| 426 | } | ||
