allow 0 nmaster
This commit is contained in:
parent
5ccd42f807
commit
90af1ced3c
1 changed files with 5 additions and 3 deletions
8
dwm.c
8
dwm.c
|
@ -1028,7 +1028,7 @@ grabkeys(void) {
|
||||||
|
|
||||||
void
|
void
|
||||||
incnmaster(const Arg *arg) {
|
incnmaster(const Arg *arg) {
|
||||||
selmon->nmaster = MAX(selmon->nmaster + arg->i, 1);
|
selmon->nmaster = MAX(selmon->nmaster + arg->i, 0);
|
||||||
arrange(selmon);
|
arrange(selmon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1666,8 +1666,10 @@ tile(Monitor *m) {
|
||||||
if(n == 0)
|
if(n == 0)
|
||||||
return;
|
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++)
|
for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
|
||||||
if(i < m->nmaster) {
|
if(i < m->nmaster) {
|
||||||
h = (m->wh - my) / (MIN(n, m->nmaster) - i);
|
h = (m->wh - my) / (MIN(n, m->nmaster) - i);
|
||||||
|
|
Loading…
Reference in a new issue