summaryrefslogtreecommitdiffhomepage
path: root/patch/cfacts.c
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-03-25 15:15:47 +0100
committerbakkeby <[email protected]>2020-03-25 15:15:47 +0100
commit32d3d2b7c37184595f1347f5d03fc7c0fce94b92 (patch)
tree1e1d835e90e01e80750c075a5080dc8b5ccac0dd /patch/cfacts.c
parentd17a306a94127b8ac971c03aa41bf709dd50d428 (diff)
downloaddwm-flexipatch-32d3d2b7c37184595f1347f5d03fc7c0fce94b92.tar.gz
dwm-flexipatch-32d3d2b7c37184595f1347f5d03fc7c0fce94b92.zip
Adding dragcfact patch, ref. #19
Diffstat (limited to 'patch/cfacts.c')
-rw-r--r--patch/cfacts.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/patch/cfacts.c b/patch/cfacts.c
index 0307eb6..223436f 100644
--- a/patch/cfacts.c
+++ b/patch/cfacts.c
@@ -8,11 +8,14 @@ setcfact(const Arg *arg)
if (!arg || !c || !selmon->lt[selmon->sellt]->arrange)
return;
- f = arg->f + c->cfact;
- if (arg->f == 0.0)
+ if (!arg->f)
f = 1.0;
- else if (f < 0.25 || f > 4.0)
- return;
+ else
+ f = arg->f + c->cfact;
+ if (f < 0.25)
+ f = 0.25;
+ else if (f > 4.0)
+ f = 4.0;
c->cfact = f;
arrange(selmon);
} \ No newline at end of file