diff options
| author | bakkeby <[email protected]> | 2020-10-04 21:02:56 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-10-04 21:02:56 +0200 |
| commit | f08883883a9c66bf290baeb9270ec3e4bb5be1da (patch) | |
| tree | 8803b46a3a528961ab3077181ca246398db2abda /patch/setborderpx.c | |
| parent | 45f763b837c3d28dfdd6123207d553ea6f6cd3e6 (diff) | |
| download | dwm-flexipatch-f08883883a9c66bf290baeb9270ec3e4bb5be1da.tar.gz dwm-flexipatch-f08883883a9c66bf290baeb9270ec3e4bb5be1da.zip | |
setborderpx: add support for updating bar borderpx
Diffstat (limited to 'patch/setborderpx.c')
| -rw-r--r-- | patch/setborderpx.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/patch/setborderpx.c b/patch/setborderpx.c index be34b2d..320aaa4 100644 --- a/patch/setborderpx.c +++ b/patch/setborderpx.c @@ -11,12 +11,23 @@ setborderpx(const Arg *arg) else selmon->borderpx += arg->i; + #if BAR_BORDER_PATCH + for (bar = selmon->bar; bar; bar = bar->next) { + bar->bh = bar->bh - 2 * bar->borderpx + 2 * selmon->borderpx; + bar->borderpx = selmon->borderpx; + } + updatebarpos(selmon); + for (bar = selmon->bar; bar; bar = bar->next) + XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh); + #endif // BAR_BORDER_PATCH + for (c = selmon->clients; c; c = c->next) { if (c->bw + arg->i < 0) - c->bw = selmon->borderpx = 0; + c->bw = 0; else c->bw = selmon->borderpx; + if (c->isfloating || !selmon->lt[selmon->sellt]->arrange) { if (arg->i != 0 && prev_borderpx + arg->i >= 0) |
