X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/a82e7b765e8da9fedb8fae6b102796f0494a4f5e..0d0e8bde134b999dd22c891d227d886ca6c9ba2c:/view.c diff --git a/view.c b/view.c index c005a33..8df93ef 100644 --- a/view.c +++ b/view.c @@ -82,8 +82,8 @@ dotile(Arg *arg) maximized = False; w = sw - mw; - for(n = 0, c = clients; c; c = c->next) - if(isvisible(c) && !c->isfloat) + for(n = 0, c = clients; c && !c->isfloat; c = c->next) + if(isvisible(c)) n++; if(n > 1) @@ -186,8 +186,8 @@ resizecol(Arg *arg) unsigned int n; Client *c; - for(n = 0, c = clients; c; c = c->next) - if(isvisible(c) && !c->isfloat) + for(n = 0, c = clients; c && !c->isfloat; c = c->next) + if(isvisible(c)) n++; if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) return; @@ -311,14 +311,14 @@ zoom(Arg *arg) unsigned int n; Client *c; - for(n = 0, c = clients; c; c = c->next) - if(isvisible(c) && !c->isfloat) + for(n = 0, c = clients; c && !c->isfloat; c = c->next) + if(isvisible(c)) n++; if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) return; - if((c = sel) == getnext(clients)) - if(!(c = getnext(c->next))) + if((c = sel) == getnext(clients)) + if(!(c = getnext(c->next)) || c->isfloat) return; detach(c); c->next = clients;