aboutsummaryrefslogtreecommitdiff
path: root/monsterwm.c
diff options
context:
space:
mode:
authortslil clingman <tslil@posteo.de>2022-11-05 16:56:50 +0100
committertslil clingman <tslil@posteo.de>2022-11-05 16:59:34 +0100
commitc358e568642063a78aaf849972e8ecb55b082861 (patch)
treeb967724f07faf7a70036537e20794950170aae46 /monsterwm.c
parentf1ced2b5e186789a142bd44d92075c83358cc3fd (diff)
Add pointless gaps and fix rtileHEADmain
Diffstat (limited to 'monsterwm.c')
-rw-r--r--monsterwm.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/monsterwm.c b/monsterwm.c
index 2f2dbec..421a1bc 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -1187,20 +1187,25 @@ void stack(int x, int y, int w, int h, const Desktop *d) {
/* tile the first non-floating, non-fullscreen window to cover the master area */
if (b) XMoveResizeWindow(dis, c->win, x, y, w - 2*BORDER_WIDTH, ma - BORDER_WIDTH);
- else if (r) XMoveResizeWindow(dis, c->win, w - ma + BORDER_WIDTH, y, ma, h - 2*BORDER_WIDTH);
+ else if (r) XMoveResizeWindow(dis, c->win, w - ma - BORDER_WIDTH, y, ma - BORDER_WIDTH, h - 2*BORDER_WIDTH);
else XMoveResizeWindow(dis, c->win, x, y, ma - BORDER_WIDTH, h - 2*BORDER_WIDTH);
- /* tile the next non-floating, non-fullscreen (and first) stack window adding p */
+ /* tile the next non-floating, non-fullscreen (and first) stack window adding p - GAP_WIDTH */
for (c = c->next; c && ISFFT(c); c = c->next);
- int cw = (b ? h:w) - 2*BORDER_WIDTH - ma, ch = z - BORDER_WIDTH;
- if (b) XMoveResizeWindow(dis, c->win, x, y += ma, ch - BORDER_WIDTH + p, cw);
- else XMoveResizeWindow(dis, c->win, r ? x : (x += ma), y, cw, ch - BORDER_WIDTH + p);
+ int cw = (b ? h:w) - 2*BORDER_WIDTH - ma - GAP_WIDTH, ch = z - BORDER_WIDTH;
+ if (b) {
+ XMoveResizeWindow(dis, c->win, x, (y += ma + GAP_WIDTH), ch - BORDER_WIDTH + p, cw);
+ x += GAP_WIDTH;
+ } else {
+ XMoveResizeWindow(dis, c->win, r ? x : (x += ma + GAP_WIDTH), y, cw, ch - BORDER_WIDTH + p);
+ y += GAP_WIDTH;
+ }
/* tile the rest of the non-floating, non-fullscreen stack windows */
for (b ? (x += ch+p):(y += ch+p), c = c->next; c; c = c->next) {
if (ISFFT(c)) continue;
- if (b) { XMoveResizeWindow(dis, c->win, x, y, ch, cw); x += z; }
- else { XMoveResizeWindow(dis, c->win, x, y, cw, ch); y += z; }
+ if (b) { XMoveResizeWindow(dis, c->win, x, y, ch - GAP_WIDTH, cw); x += z; }
+ else { XMoveResizeWindow(dis, c->win, x, y, cw, ch - GAP_WIDTH); y += z; }
}
}