X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=view.c;h=81dd4b399823bfdf30eb452cddcf7fb452827083;hb=b233089815367983e07939b2aabb999fdc359f91;hp=b8dd79abbd2ae22c5e898867b412f6dc328e3374;hpb=6c5dc7017cff322b6402b3849c07529f5ab916fe;p=dwm.git diff --git a/view.c b/view.c index b8dd79a..81dd4b3 100644 --- a/view.c +++ b/view.c @@ -31,7 +31,7 @@ togglemax(Client *c) { c->w = c->rw; c->h = c->rh; } - resize(c, True, TopLeft); + resize(c, True); while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } @@ -56,7 +56,7 @@ dofloat(void) { for(c = clients; c; c = c->next) { if(isvisible(c)) { - resize(c, True, TopLeft); + resize(c, True); } else XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); @@ -84,7 +84,7 @@ dotile(void) { for(i = 0, c = clients; c; c = c->next) if(isvisible(c)) { if(c->isfloat) { - resize(c, True, TopLeft); + resize(c, True); continue; } c->ismax = False; @@ -105,7 +105,7 @@ dotile(void) { else /* fallback if th < bh */ c->h = wah - 2 * BORDERPX; } - resize(c, False, TopLeft); + resize(c, False); i++; } else @@ -152,7 +152,6 @@ incnmaster(Arg *arg) { if((arrange == dofloat) || (nmaster + arg->i < 1) || (wah / (nmaster + arg->i) < bh)) return; nmaster += arg->i; - updatemodetext(); if(sel) arrange(); else @@ -186,10 +185,9 @@ restack(void) { Client *c; XEvent ev; - if(!sel) { - drawstatus(); + drawstatus(); + if(!sel) return; - } if(sel->isfloat || arrange == dofloat) XRaiseWindow(dpy, sel->win); if(arrange != dofloat) { @@ -201,7 +199,6 @@ restack(void) { XLowerWindow(dpy, c->win); } } - drawall(); XSync(dpy, False); while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } @@ -217,7 +214,6 @@ togglefloat(Arg *arg) { void togglemode(Arg *arg) { arrange = (arrange == dofloat) ? dotile : dofloat; - updatemodetext(); if(sel) arrange(); else @@ -236,12 +232,6 @@ toggleview(Arg *arg) { } void -updatemodetext() { - snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster); - bmw = textw(mtext); -} - -void view(Arg *arg) { unsigned int i;