diff options
author | Connor Lane Smith <cls@lubutu.com> | 2011-10-31 20:09:27 +0100 |
---|---|---|
committer | Connor Lane Smith <cls@lubutu.com> | 2011-10-31 20:09:27 +0100 |
commit | 90af1ced3c634683ec4c0e51c5f1e69461a9192a (patch) | |
tree | d85e035e71e632bf0cec8f87f3c868680409dc4b /dwm.c | |
parent | 5ccd42f80752be8f5152e09ecd250ba42739bf6d (diff) | |
download | dwm-90af1ced3c634683ec4c0e51c5f1e69461a9192a.tar.gz dwm-90af1ced3c634683ec4c0e51c5f1e69461a9192a.tar.bz2 dwm-90af1ced3c634683ec4c0e51c5f1e69461a9192a.zip |
allow 0 nmaster
Diffstat (limited to 'dwm.c')
-rw-r--r-- | dwm.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1028,7 +1028,7 @@ grabkeys(void) { void incnmaster(const Arg *arg) { - selmon->nmaster = MAX(selmon->nmaster + arg->i, 1); + selmon->nmaster = MAX(selmon->nmaster + arg->i, 0); arrange(selmon); } @@ -1666,8 +1666,10 @@ tile(Monitor *m) { if(n == 0) return; - mw = (n > m->nmaster) ? m->ww * m->mfact : m->ww; - + if(n > m->nmaster) + mw = m->nmaster ? m->ww * m->mfact : 0; + else + mw = m->ww; for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) if(i < m->nmaster) { h = (m->wh - my) / (MIN(n, m->nmaster) - i); |