diff options
| author | bakkeby <[email protected]> | 2020-03-07 17:04:17 +0100 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-03-07 17:50:06 +0100 |
| commit | 143f94cbc2d9d6e4a8432677f2af30be70031a9b (patch) | |
| tree | fcc917f53cdc9dd91c19227a9b63b58110b4884e /patch | |
| parent | 58ab50845d5af725700dcfb1ef8c1f1053a78a88 (diff) | |
| download | dwm-flexipatch-143f94cbc2d9d6e4a8432677f2af30be70031a9b.tar.gz dwm-flexipatch-143f94cbc2d9d6e4a8432677f2af30be70031a9b.zip | |
Fix for 0 nmaster for tile layout
Diffstat (limited to 'patch')
| -rw-r--r-- | patch/cfacts.c | 2 | ||||
| -rw-r--r-- | patch/tile.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/patch/cfacts.c b/patch/cfacts.c index 872c8e8..82ee560 100644 --- a/patch/cfacts.c +++ b/patch/cfacts.c @@ -26,7 +26,7 @@ getfacts(Monitor *m, float *mf, float *sf) Client *c; 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; else sfacts += c->cfact; diff --git a/patch/tile.c b/patch/tile.c index c8f74c9..3f03483 100644 --- a/patch/tile.c +++ b/patch/tile.c @@ -17,14 +17,14 @@ tile(Monitor *m) sx = mx = m->wx + ov; 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; if (m->nmaster && n > m->nmaster) { sw = (mw - iv) * (1 - m->mfact); mw = (mw - iv) * m->mfact; 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++) @@ -53,14 +53,14 @@ tile(Monitor *m) sx = mx = m->wx + ov; 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; if (m->nmaster && n > m->nmaster) { sw = (mw - iv) * (1 - m->mfact); mw = (mw - iv) * m->mfact; 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++) @@ -134,4 +134,4 @@ tile(Monitor *m) ty += HEIGHT(c); } } -#endif
\ No newline at end of file +#endif |
