diff options
Diffstat (limited to '')
| -rw-r--r-- | view.c | 30 |
1 files changed, 13 insertions, 17 deletions
| @@ -57,22 +57,20 @@ detach(Client *c) | |||
| 57 | void | 57 | void |
| 58 | dofloat(Arg *arg) | 58 | dofloat(Arg *arg) |
| 59 | { | 59 | { |
| 60 | Client *c; | 60 | Client *c, *fc; |
| 61 | |||
| 62 | maximized = False; | ||
| 61 | 63 | ||
| 62 | for(c = clients; c; c = c->next) { | 64 | for(c = clients; c; c = c->next) { |
| 63 | c->ismax = False; | ||
| 64 | if(isvisible(c)) { | 65 | if(isvisible(c)) { |
| 65 | resize(c, True, TopLeft); | 66 | resize(c, True, TopLeft); |
| 66 | } | 67 | } |
| 67 | else | 68 | else |
| 68 | ban(c); | 69 | ban(c); |
| 69 | } | 70 | } |
| 70 | if(!sel || !isvisible(sel)) | 71 | if(!(fc = sel) || !isvisible(fc)) |
| 71 | sel = getnext(clients); | 72 | fc = getnext(clients); |
| 72 | if(sel) | 73 | focus(fc); |
| 73 | focus(sel); | ||
| 74 | else | ||
| 75 | XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); | ||
| 76 | restack(); | 74 | restack(); |
| 77 | } | 75 | } |
| 78 | 76 | ||
| @@ -80,7 +78,9 @@ void | |||
| 80 | dotile(Arg *arg) | 78 | dotile(Arg *arg) |
| 81 | { | 79 | { |
| 82 | int h, i, n, w; | 80 | int h, i, n, w; |
| 83 | Client *c; | 81 | Client *c, *fc; |
| 82 | |||
| 83 | maximized = False; | ||
| 84 | 84 | ||
| 85 | w = sw - mw; | 85 | w = sw - mw; |
| 86 | for(n = 0, c = clients; c; c = c->next) | 86 | for(n = 0, c = clients; c; c = c->next) |
| @@ -93,7 +93,6 @@ dotile(Arg *arg) | |||
| 93 | h = sh - bh; | 93 | h = sh - bh; |
| 94 | 94 | ||
| 95 | for(i = 0, c = clients; c; c = c->next) { | 95 | for(i = 0, c = clients; c; c = c->next) { |
| 96 | c->ismax = False; | ||
| 97 | if(isvisible(c)) { | 96 | if(isvisible(c)) { |
| 98 | if(c->isfloat) { | 97 | if(c->isfloat) { |
| 99 | resize(c, True, TopLeft); | 98 | resize(c, True, TopLeft); |
| @@ -132,12 +131,9 @@ dotile(Arg *arg) | |||
| 132 | else | 131 | else |
| 133 | ban(c); | 132 | ban(c); |
| 134 | } | 133 | } |
| 135 | if(!sel || !isvisible(sel)) | 134 | if(!(fc = sel) || !isvisible(fc)) |
| 136 | sel = getnext(clients); | 135 | fc = getnext(clients); |
| 137 | if(sel) | 136 | focus(fc); |
| 138 | focus(sel); | ||
| 139 | else | ||
| 140 | XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); | ||
| 141 | restack(); | 137 | restack(); |
| 142 | } | 138 | } |
| 143 | 139 | ||
| @@ -289,7 +285,7 @@ zoom(Arg *arg) | |||
| 289 | { | 285 | { |
| 290 | Client *c = sel; | 286 | Client *c = sel; |
| 291 | 287 | ||
| 292 | if(!c || (arrange != dotile) || c->isfloat || c->ismax) | 288 | if(!c || (arrange != dotile) || c->isfloat || maximized) |
| 293 | return; | 289 | return; |
| 294 | 290 | ||
| 295 | if(c == getnext(clients)) | 291 | if(c == getnext(clients)) |
