diff options
| author | Anselm R. Garbe <arg@10kloc.org> | 2006-09-05 16:00:09 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@10kloc.org> | 2006-09-05 16:00:09 +0200 |
| commit | ec85fddb9a3a93a216b779cc39fead1a3d90aafd (patch) | |
| tree | 318402a2be60948de224afe5ae133871b906b5e9 | |
| parent | renamed resizetile into resizecol (diff) | |
| download | dwm-ec85fddb9a3a93a216b779cc39fead1a3d90aafd.tar.gz dwm-ec85fddb9a3a93a216b779cc39fead1a3d90aafd.zip | |
applied checking existance of >2 tiles patch (proposed by sander) to zoom and resizecol
| -rw-r--r-- | view.c | 19 |
1 files changed, 14 insertions, 5 deletions
| @@ -183,10 +183,15 @@ isvisible(Client *c) | |||
| 183 | void | 183 | void |
| 184 | resizecol(Arg *arg) | 184 | resizecol(Arg *arg) |
| 185 | { | 185 | { |
| 186 | Client *c = getnext(clients); | 186 | unsigned int n; |
| 187 | Client *c; | ||
| 187 | 188 | ||
| 188 | if(!sel || !getnext(c->next) || (arrange != dotile)) | 189 | for(n = 0, c = clients; c; c = c->next) |
| 190 | if(isvisible(c) && !c->isfloat) | ||
| 191 | n++; | ||
| 192 | if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) | ||
| 189 | return; | 193 | return; |
| 194 | |||
| 190 | if(sel == getnext(clients)) { | 195 | if(sel == getnext(clients)) { |
| 191 | if(mw + arg->i > sw - 100) | 196 | if(mw + arg->i > sw - 100) |
| 192 | return; | 197 | return; |
| @@ -303,12 +308,16 @@ viewall(Arg *arg) | |||
| 303 | void | 308 | void |
| 304 | zoom(Arg *arg) | 309 | zoom(Arg *arg) |
| 305 | { | 310 | { |
| 306 | Client *c = sel; | 311 | unsigned int n; |
| 312 | Client *c; | ||
| 307 | 313 | ||
| 308 | if(!c || (arrange != dotile) || c->isfloat || maximized) | 314 | for(n = 0, c = clients; c; c = c->next) |
| 315 | if(isvisible(c) && !c->isfloat) | ||
| 316 | n++; | ||
| 317 | if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) | ||
| 309 | return; | 318 | return; |
| 310 | 319 | ||
| 311 | if(c == getnext(clients)) | 320 | if((c = sel) == getnext(clients)) |
| 312 | if(!(c = getnext(c->next))) | 321 | if(!(c = getnext(c->next))) |
| 313 | return; | 322 | return; |
| 314 | detach(c); | 323 | detach(c); |
