X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;ds=sidebyside;f=view.c;h=f2e4040ddb3e37099cd3a25d4047a18a9c3406a1;hb=6c767072a3afab0ecebaa54b028c4dfea07ccccc;hp=ffa22a17582461939bfa65c33ffff3bbc9a6da8d;hpb=7ac0de8350c51ef39e4dee5f60e1da641c4fbd5b;p=dwm.git diff --git a/view.c b/view.c index ffa22a1..f2e4040 100644 --- a/view.c +++ b/view.c @@ -260,14 +260,14 @@ zoom(Arg *arg) { for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) n++; - c = sel; - if(arrange != dofloat) { - detach(c); - if(clients) - clients->prev = c; - c->next = clients; - clients = c; - focus(c); - arrange(); - } + if((c = sel) == nexttiled(clients)) + if(!(c = nexttiled(c->next))) + return; + detach(c); + if(clients) + clients->prev = c; + c->next = clients; + clients = c; + focus(c); + arrange(); }