X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=view.c;h=0c9ea6f0374c3edab6e26934ca266c1f5016c8e3;hb=f78c16f8c6134262da3f07cd7c8c33ca6d62a261;hp=daf07114dde297613ab6899cc22e3c97e0890fa2;hpb=ce9a9934ec7f58398cc62f2653fcccae5fec1853;p=dwm.git diff --git a/view.c b/view.c index daf0711..0c9ea6f 100644 --- a/view.c +++ b/view.c @@ -44,6 +44,9 @@ reorder(void) { static void togglemax(Client *c) { XEvent ev; + + if(c->isfixed) + return; if((c->ismax = !c->ismax)) { c->rx = c->x; c->x = sx; @@ -192,25 +195,14 @@ isvisible(Client *c) { } void -resizecol(Arg *arg) { - unsigned int n; - Client *c; - - for(n = 0, c = clients; c; c = c->next) - if(isvisible(c) && !c->isfloat) - n++; - if(!sel || sel->isfloat || n < 2 || (arrange == dofloat)) - return; - if(sel == getnext(clients)) { +resizemaster(Arg *arg) { + if(arg->i == 0) + master = MASTER; + else { if(master + arg->i > 950 || master + arg->i < 50) return; master += arg->i; } - else { - if(master - arg->i > 950 || master - arg->i < 50) - return; - master -= arg->i; - } arrange(); }