diff options
author | Philip Wittamore <philip@wittamore.com> | 2025-05-23 09:17:04 +0200 |
---|---|---|
committer | Philip Wittamore <philip@wittamore.com> | 2025-05-23 09:17:04 +0200 |
commit | ec1a6b3891946eb2cc556ead0b1b57392e57f370 (patch) | |
tree | f8405e4cac40c142e52e05903c97a6b6bb0f3f39 /dwm.c | |
parent | c6c3e2e2a7c10463cddb585e48a6950586cc7463 (diff) | |
download | dwm-ec1a6b3891946eb2cc556ead0b1b57392e57f370.tar.gz dwm-ec1a6b3891946eb2cc556ead0b1b57392e57f370.tar.bz2 dwm-ec1a6b3891946eb2cc556ead0b1b57392e57f370.zip |
update
Diffstat (limited to 'dwm.c')
-rw-r--r-- | dwm.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1477,12 +1477,26 @@ void resizeclient(Client *c, int x, int y, int w, int h) { XWindowChanges wc; + unsigned int n; + Client *nbc; c->oldx = c->x; c->x = wc.x = x; c->oldy = c->y; c->y = wc.y = y; c->oldw = c->w; c->w = wc.width = w; c->oldh = c->h; c->h = wc.height = h; wc.border_width = c->bw; + + for (n = 0, nbc = nexttiled(c->mon->clients); nbc; nbc = nexttiled(nbc->next), n++); + + if (c->isfloating || c->mon->lt[c->mon->sellt]->arrange == NULL) { + } else { + if (c->mon->lt[c->mon->sellt]->arrange == monocle || n == 1) { + wc.border_width = 0; + c->w = wc.width += c->bw * 2; + c->h = wc.height += c->bw * 2; + } + } + XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc); configure(c); XSync(dpy, False); |