diff options
| author | bakkeby <[email protected]> | 2020-07-09 16:04:04 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-07-09 16:04:04 +0200 |
| commit | 1584a32063cd252ec726dd18747c5f91f12f8be9 (patch) | |
| tree | a43d50b364c49cb33235e79d1b87d9737b3f0b58 | |
| parent | 1d8aef219871b9c390ddea724fbc3eaea0b521a4 (diff) | |
| download | dwm-flexipatch-1584a32063cd252ec726dd18747c5f91f12f8be9.tar.gz dwm-flexipatch-1584a32063cd252ec726dd18747c5f91f12f8be9.zip | |
flextile deluxe: fixed dual stack bug
| -rw-r--r-- | patch/flextile-deluxe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patch/flextile-deluxe.c b/patch/flextile-deluxe.c index c8b7e3e..a877c92 100644 --- a/patch/flextile-deluxe.c +++ b/patch/flextile-deluxe.c @@ -504,7 +504,7 @@ arrange_gapplessgrid_alt1(Monitor *m, int x, int y, int h, int w, int ih, int iv rest = (h - ih * (rows - 1)) - ch * rows; for (i = 0; i < rows; i++) { - arrange_left_to_right(m, x, y, ch + (i < rest ? 1 : 0), w, ih, iv, n, cols, ai + i*cols); + arrange_left_to_right(m, x, y, ch + (i < rest ? 1 : 0), w, ih, iv, n, MIN(cols, an - i*cols), ai + i*cols); y += ch + (i < rest ? 1 : 0) + ih; } } @@ -524,7 +524,7 @@ arrange_gapplessgrid_alt2(Monitor *m, int x, int y, int h, int w, int ih, int iv rest = (w - iv * (cols - 1)) - cw * cols; for (i = 0; i < cols; i++) { - arrange_top_to_bottom(m, x, y, h, cw + (i < rest ? 1 : 0), ih, iv, n, rows, ai + i*rows); + arrange_top_to_bottom(m, x, y, h, cw + (i < rest ? 1 : 0), ih, iv, n, MIN(rows, an - i*rows), ai + i*rows); x += cw + (i < rest ? 1 : 0) + iv; } } |
