[hackers] [dwm] applied Gottox mwfact patch

From: Anselm R. Garbe <garbeam_AT_gmail.com>
Date: Sat Aug 18 11:48:28 2007

changeset: 962:8d1df2c37229
tag: tip
user: Anselm R. Garbe <garbeam_AT_gmail.com>
date: Sat Aug 18 11:40:25 2007 +0200
summary: applied Gottox mwfact patch

diff -r edfafdb7084d -r 8d1df2c37229 tile.c
--- a/tile.c Fri Aug 17 21:19:07 2007 +0200
+++ b/tile.c Sat Aug 18 11:40:25 2007 +0200
@@ -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();
 }
Received on Sat Aug 18 2007 - 11:48:28 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:56 UTC