diff options
author | Anselm R. Garbe <garbeam@gmail.com> | 2007-08-18 11:40:25 +0200 |
---|---|---|
committer | Anselm R. Garbe <garbeam@gmail.com> | 2007-08-18 11:40:25 +0200 |
commit | 7d156dee1e80f7d26aa0a31a6d2c75af06cbaa9a (patch) | |
tree | f6f7cf2ae8f4b4d4ce374ffc245aafc2d440194b /tile.c | |
parent | 55d8dda9f45503f25804a9dbfeb4c878284a6576 (diff) | |
download | dwm-7d156dee1e80f7d26aa0a31a6d2c75af06cbaa9a.tar.gz |
applied Gottox mwfact patch
Diffstat (limited to 'tile.c')
-rw-r--r-- | tile.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tile.c b/tile.c index 0955e63..114e84c 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(); } |