X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/06bae9dfb7902c97877f3493cf4b489ccf531089..d939f301fa5ee472f2b089496b5e873ec155fa8e:/view.c diff --git a/view.c b/view.c index 2143d70..793151d 100644 --- a/view.c +++ b/view.c @@ -192,9 +192,10 @@ focusprev(Arg *arg) { void incnmaster(Arg *arg) { - if(nmaster + arg->i < 1) + if(nmaster + arg->i < 1 || (wah / (nmaster + arg->i) < bh)) return; nmaster += arg->i; + arrange(); } @@ -302,10 +303,11 @@ zoom(Arg *arg) { } for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) n++; - if(n <= nmaster || (arrange == dofloat)) - return; - if(ismaster((c = sel))) { + c = sel; + if(n <= nmaster || (arrange == dofloat)) + pop(c); + else if(ismaster(sel)) { if(!(c = topofstack())) return; swap(c, sel);