summaryrefslogtreecommitdiffstats
path: root/view.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-05 16:00:09 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-05 16:00:09 +0200
commitec85fddb9a3a93a216b779cc39fead1a3d90aafd (patch)
tree318402a2be60948de224afe5ae133871b906b5e9 /view.c
parentrenamed resizetile into resizecol (diff)
downloaddwm-ec85fddb9a3a93a216b779cc39fead1a3d90aafd.tar.gz
dwm-ec85fddb9a3a93a216b779cc39fead1a3d90aafd.zip
applied checking existance of >2 tiles patch (proposed by sander) to zoom and resizecol
Diffstat (limited to '')
-rw-r--r--view.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/view.c b/view.c
index 4b4c9eb..587c53a 100644
--- a/view.c
+++ b/view.c
@@ -183,10 +183,15 @@ isvisible(Client *c)
183void 183void
184resizecol(Arg *arg) 184resizecol(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)
303void 308void
304zoom(Arg *arg) 309zoom(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);