aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Gassner <justin.gassner@web.de>2017-10-07 18:01:07 +0200
committerJustin Gassner <justin.gassner@mailbox.org>2024-03-21 18:34:30 +0100
commit36447ef1675c4fc0f295247f33ec7a696bed7597 (patch)
treecdd02b5a7c07457ea3eb05e5e301ea0c1df66bb3
parent061e9fe9a7db396c0c4f3d996c3908fb43a6d50c (diff)
downloaddwm-noborder.tar.zst
applied suckless.org noborder patchnoborder
remove the border when there is only one window visible
-rw-r--r--dwm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/dwm.c b/dwm.c
index f1d86b2..5bdb935 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1292,6 +1292,13 @@ resizeclient(Client *c, int x, int y, int w, int h)
c->oldw = c->w; c->w = wc.width = w;
c->oldh = c->h; c->h = wc.height = h;
wc.border_width = c->bw;
+ if (((nexttiled(c->mon->clients) == c && !nexttiled(c->next))
+ || &monocle == c->mon->lt[c->mon->sellt]->arrange)
+ && !c->isfullscreen) {
+ c->w = wc.width += c->bw * 2;
+ c->h = wc.height += c->bw * 2;
+ wc.border_width = 0;
+ }
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
configure(c);
XSync(dpy, False);