diff options
Diffstat (limited to 'patch/cfacts.c')
| -rw-r--r-- | patch/cfacts.c | 11 |
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 |
