X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=tile.c;h=56a06d36a05a651d12a84fcd7378625dfbcb0f37;hp=0955e635b42a4eba7251607dd8c6affc7eea3638;hb=2091200c957783deed032380d56c4199a23c6b81;hpb=a923298d3577dca0e69fd70edbef56c7822258e3 diff --git a/tile.c b/tile.c index 0955e63..56a06d3 100644 --- a/tile.c +++ b/tile.c @@ -10,7 +10,7 @@ static double mwfact = MWFACT; void setmwfact(const char *arg) { - double delta, newfact; + double delta; if(!isarrange(tile)) return; @@ -19,14 +19,13 @@ setmwfact(const char *arg) { mwfact = MWFACT; else if(1 == sscanf(arg, "%lf", &delta)) { if(arg[0] != '+' && arg[0] != '-') - newfact = delta; + mwfact = delta; else - newfact = mwfact + delta; - if(newfact < 0.1) - newfact = 0.1; - else if(newfact > 0.9) - newfact = 0.9; - mwfact = newfact; + mwfact += delta; + if(mwfact < 0.1) + mwfact = 0.1; + else if(mwfact > 0.9) + mwfact = 0.9; } arrange(); } @@ -47,7 +46,7 @@ tile(void) { nx = wax; ny = way; - for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) { + for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next), i++) { c->ismax = False; if(i == 0) { /* master */ nw = mw - 2 * c->border; @@ -64,10 +63,9 @@ tile(void) { else nh = th - 2 * c->border; } - resize(c, nx, ny, nw, nh, False); + resize(c, nx, ny, nw, nh, RESIZEHINTS); if(n > 1 && th != wah) ny += nh + 2 * c->border; - i++; } }