diff options
| author | bakkeby <[email protected]> | 2020-05-10 17:11:05 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-05-10 17:11:05 +0200 |
| commit | 0b429b499463903ba9c9a68657657dbe22cf4f11 (patch) | |
| tree | 10313dcf5510f43c62da983094fc287dfe754317 /patch | |
| parent | ac4c5081c577d4f1604b0de48e7a0c5d4b44d34e (diff) | |
| download | dwm-flexipatch-0b429b499463903ba9c9a68657657dbe22cf4f11.tar.gz dwm-flexipatch-0b429b499463903ba9c9a68657657dbe22cf4f11.zip | |
Fibonacci updates
Diffstat (limited to 'patch')
| -rw-r--r-- | patch/flextile-deluxe.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/patch/flextile-deluxe.c b/patch/flextile-deluxe.c index 4c037fd..986460f 100644 --- a/patch/flextile-deluxe.c +++ b/patch/flextile-deluxe.c @@ -446,11 +446,11 @@ arrange_gapplessgrid(Monitor *m, int x, int y, int h, int w, int ih, int iv, int for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { if (i >= ai && i < (ai + an)) { - if (cc/rows + 1 > cols - an%cols) { + if (cc/rows + 1 > cols - an%cols) { rows = an/cols + 1; ch = (h - ih * (rows - 1)) / rows; rrest = (h - ih * (rows - 1)) - ch * rows; - } + } resize(c, x, y + rn*(ch + ih) + MIN(rn, rrest), @@ -537,10 +537,14 @@ arrange_fibonacci(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n, ny += nh + ih; } if ((i % 4) == 0) { - if (s) + if (s) { ny += nh + ih; - else + nh += hrest; + } + else { + nh -= hrest; ny -= nh + ih; + } } else if ((i % 4) == 1) { nx += nw + iv; @@ -559,11 +563,14 @@ arrange_fibonacci(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n, } else { nw -= wrest; nx -= nw + iv; + nh += hrest; } } if (i == 0) { - if (an != 1) - nw = (w - iv) * m->mfact; + if (an != 1) { + nw = (w - iv) - (w - iv) * (1 - m->mfact); + wrest = 0; + } ny = y; } else if (i == 1) |
