allow 0 nmaster
Connor Lane Smith cls@lubutu.com
Mon, 31 Oct 2011 20:09:27 +0100
1 files changed,
5 insertions(+),
3 deletions(-)
jump to
M
dwm.c
→
dwm.c
@@ -1028,7 +1028,7 @@ }
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 @@ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
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);