aboutsummaryrefslogtreecommitdiff
path: root/patches/dwm-removeborder-20220626-d3f93c7.diff
diff options
context:
space:
mode:
authorPhilip Wittamore <philip@wittamore.com>2025-05-31 23:55:39 +0200
committerPhilip Wittamore <philip@wittamore.com>2025-05-31 23:55:39 +0200
commit5d272e82d7eeb5f3850b8487cec5612717c44763 (patch)
tree8bb6fb92d9be87edf712157ed56c77a1776061e1 /patches/dwm-removeborder-20220626-d3f93c7.diff
parent5e2e44482ce3e05be0d030a8defac1dd281840a4 (diff)
downloaddwm-5d272e82d7eeb5f3850b8487cec5612717c44763.tar.gz
dwm-5d272e82d7eeb5f3850b8487cec5612717c44763.tar.bz2
dwm-5d272e82d7eeb5f3850b8487cec5612717c44763.zip
update
Diffstat (limited to 'patches/dwm-removeborder-20220626-d3f93c7.diff')
-rw-r--r--patches/dwm-removeborder-20220626-d3f93c7.diff31
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/dwm-removeborder-20220626-d3f93c7.diff b/patches/dwm-removeborder-20220626-d3f93c7.diff
new file mode 100644
index 0000000..9193a77
--- /dev/null
+++ b/patches/dwm-removeborder-20220626-d3f93c7.diff
@@ -0,0 +1,31 @@
+diff --git a/dwm.c b/dwm.c
+index 5646a5c..27e29df 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -1283,12 +1283,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);