mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
Fix for 0 nmaster for tile layout
This commit is contained in:
parent
58ab50845d
commit
143f94cbc2
@ -26,7 +26,7 @@ getfacts(Monitor *m, float *mf, float *sf)
|
|||||||
Client *c;
|
Client *c;
|
||||||
|
|
||||||
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) {
|
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) {
|
||||||
if (!m->nmaster || n < m->nmaster)
|
if (m->nmaster && n < m->nmaster)
|
||||||
mfacts += c->cfact;
|
mfacts += c->cfact;
|
||||||
else
|
else
|
||||||
sfacts += c->cfact;
|
sfacts += c->cfact;
|
||||||
|
@ -17,14 +17,14 @@ tile(Monitor *m)
|
|||||||
|
|
||||||
sx = mx = m->wx + ov;
|
sx = mx = m->wx + ov;
|
||||||
sy = my = m->wy + oh;
|
sy = my = m->wy + oh;
|
||||||
sh = mh = m->wh - 2*oh - ih * (MIN(n, m->nmaster) - 1);
|
mh = m->wh - 2*oh - ih * (MIN(n, m->nmaster) - 1);
|
||||||
|
sh = m->wh - 2*oh - ih * (n - m->nmaster - 1);
|
||||||
sw = mw = m->ww - 2*ov;
|
sw = mw = m->ww - 2*ov;
|
||||||
|
|
||||||
if (m->nmaster && n > m->nmaster) {
|
if (m->nmaster && n > m->nmaster) {
|
||||||
sw = (mw - iv) * (1 - m->mfact);
|
sw = (mw - iv) * (1 - m->mfact);
|
||||||
mw = (mw - iv) * m->mfact;
|
mw = (mw - iv) * m->mfact;
|
||||||
sx = mx + mw + iv;
|
sx = mx + mw + iv;
|
||||||
sh = m->wh - 2*oh - ih * (n - m->nmaster - 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
|
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
|
||||||
@ -53,14 +53,14 @@ tile(Monitor *m)
|
|||||||
|
|
||||||
sx = mx = m->wx + ov;
|
sx = mx = m->wx + ov;
|
||||||
sy = my = m->wy + oh;
|
sy = my = m->wy + oh;
|
||||||
sh = mh = m->wh - 2*oh - ih * (MIN(n, m->nmaster) - 1);
|
mh = m->wh - 2*oh - ih * (MIN(n, m->nmaster) - 1);
|
||||||
|
sh = m->wh - 2*oh - ih * (n - m->nmaster - 1);
|
||||||
sw = mw = m->ww - 2*ov;
|
sw = mw = m->ww - 2*ov;
|
||||||
|
|
||||||
if (m->nmaster && n > m->nmaster) {
|
if (m->nmaster && n > m->nmaster) {
|
||||||
sw = (mw - iv) * (1 - m->mfact);
|
sw = (mw - iv) * (1 - m->mfact);
|
||||||
mw = (mw - iv) * m->mfact;
|
mw = (mw - iv) * m->mfact;
|
||||||
sx = mx + mw + iv;
|
sx = mx + mw + iv;
|
||||||
sh = m->wh - 2*oh - ih * (n - m->nmaster - 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
|
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user