diff options
| author | bakkeby <[email protected]> | 2019-09-09 19:11:31 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2019-09-09 19:11:31 +0200 |
| commit | 9081aef7485d4d201ff0531e913702586e04929e (patch) | |
| tree | d4b1ea24ce89710179a30119945e5d3b9e43712b /patch/bstackhoriz.c | |
| parent | cccb8fcecb1e6bce06bec81557d9d3a37631561f (diff) | |
| download | dwm-flexipatch-9081aef7485d4d201ff0531e913702586e04929e.tar.gz dwm-flexipatch-9081aef7485d4d201ff0531e913702586e04929e.zip | |
Adding gappless grid layout
Diffstat (limited to 'patch/bstackhoriz.c')
| -rw-r--r-- | patch/bstackhoriz.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/patch/bstackhoriz.c b/patch/bstackhoriz.c index 3a4d11a..b4010fa 100644 --- a/patch/bstackhoriz.c +++ b/patch/bstackhoriz.c @@ -9,7 +9,8 @@ bstackhoriz(Monitor *m) float mfacts, sfacts; Client *c; - getgaps(m, &oh, &ov, &ih, &iv, &n, &mfacts, &sfacts); + getgaps(m, &oh, &ov, &ih, &iv, &n); + getfacts(m, &mfacts, &sfacts); if (n == 0) return; @@ -82,19 +83,15 @@ bstackhoriz(Monitor *m) unsigned int i, n; int mx = 0, my = 0, mh = 0, mw = 0; int sx = 0, sy = 0, sh = 0, sw = 0; - float mfacts = 1, sfacts = 1; + float mfacts, sfacts; Client *c; - for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) { - if (n < m->nmaster) - mfacts += c->cfact; - else - sfacts += c->cfact; - } - + for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); if (n == 0) return; + getfacts(m, &mfacts, &sfacts); + sx = mx = m->wx; sy = my = m->wy; sh = mh = m->wh; |
