diff options
Diffstat (limited to '')
| -rw-r--r-- | dwm.c | 24 |
1 files changed, 12 insertions, 12 deletions
| @@ -156,7 +156,7 @@ void manage(Window w, XWindowAttributes *wa); | |||
| 156 | void mappingnotify(XEvent *e); | 156 | void mappingnotify(XEvent *e); |
| 157 | void maprequest(XEvent *e); | 157 | void maprequest(XEvent *e); |
| 158 | void movemouse(Client *c); | 158 | void movemouse(Client *c); |
| 159 | Client *nextunfloating(Client *c); | 159 | Client *nexttiled(Client *c); |
| 160 | void propertynotify(XEvent *e); | 160 | void propertynotify(XEvent *e); |
| 161 | void quit(const void *arg); | 161 | void quit(const void *arg); |
| 162 | void resize(Client *c, int x, int y, int w, int h, Bool sizehints); | 162 | void resize(Client *c, int x, int y, int w, int h, Bool sizehints); |
| @@ -1051,7 +1051,7 @@ movemouse(Client *c) { | |||
| 1051 | } | 1051 | } |
| 1052 | 1052 | ||
| 1053 | Client * | 1053 | Client * |
| 1054 | nextunfloating(Client *c) { | 1054 | nexttiled(Client *c) { |
| 1055 | for(; c && (c->isfloating || !isvisible(c)); c = c->next); | 1055 | for(; c && (c->isfloating || !isvisible(c)); c = c->next); |
| 1056 | return c; | 1056 | return c; |
| 1057 | } | 1057 | } |
| @@ -1464,12 +1464,12 @@ tile(void) { | |||
| 1464 | uint i, n; | 1464 | uint i, n; |
| 1465 | Client *c; | 1465 | Client *c; |
| 1466 | 1466 | ||
| 1467 | for(n = 0, c = nextunfloating(clients); c; c = nextunfloating(c->next), n++); | 1467 | for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next), n++); |
| 1468 | if(n == 0) | 1468 | if(n == 0) |
| 1469 | return; | 1469 | return; |
| 1470 | 1470 | ||
| 1471 | /* master */ | 1471 | /* master */ |
| 1472 | c = nextunfloating(clients); | 1472 | c = nexttiled(clients); |
| 1473 | 1473 | ||
| 1474 | if(n == 1) | 1474 | if(n == 1) |
| 1475 | tileresize(c, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw); | 1475 | tileresize(c, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw); |
| @@ -1487,7 +1487,7 @@ tile(void) { | |||
| 1487 | if(h < bh) | 1487 | if(h < bh) |
| 1488 | h = th; | 1488 | h = th; |
| 1489 | 1489 | ||
| 1490 | for(i = 0, c = nextunfloating(c->next); c; c = nextunfloating(c->next), i++) { | 1490 | for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) { |
| 1491 | if(i + 1 == n) /* remainder */ | 1491 | if(i + 1 == n) /* remainder */ |
| 1492 | tileresize(c, x, y, w - 2 * c->bw, (ty + th) - y - 2 * c->bw); | 1492 | tileresize(c, x, y, w - 2 * c->bw, (ty + th) - y - 2 * c->bw); |
| 1493 | else | 1493 | else |
| @@ -1789,14 +1789,14 @@ void | |||
| 1789 | zoom(const void *arg) { | 1789 | zoom(const void *arg) { |
| 1790 | Client *c = sel; | 1790 | Client *c = sel; |
| 1791 | 1791 | ||
| 1792 | if(c == nextunfloating(clients)) | 1792 | if(!lt->arrange || sel->isfloating) |
| 1793 | if(!c || !(c = nextunfloating(c->next))) | 1793 | return; |
| 1794 | if(c == nexttiled(clients)) | ||
| 1795 | if(!c || !(c = nexttiled(c->next))) | ||
| 1794 | return; | 1796 | return; |
| 1795 | if(lt->arrange == tile && !sel->isfloating) { | 1797 | detach(c); |
| 1796 | detach(c); | 1798 | attach(c); |
| 1797 | attach(c); | 1799 | focus(c); |
| 1798 | focus(c); | ||
| 1799 | } | ||
| 1800 | arrange(); | 1800 | arrange(); |
| 1801 | } | 1801 | } |
| 1802 | 1802 | ||
