From 029da77458fd9dd7ce15a1e60366d683c8de5a49 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Wed, 9 Nov 2022 10:22:18 +0100 Subject: [PATCH] Apply noborder-6.2.diff --- dwm.c | 7 +++++++ patches/dwm-noborder-6.2.diff | 30 ++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 patches/dwm-noborder-6.2.diff diff --git a/dwm.c b/dwm.c index bdb5bf3..4e86acd 100644 --- a/dwm.c +++ b/dwm.c @@ -1476,6 +1476,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->isfloating) { + 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); diff --git a/patches/dwm-noborder-6.2.diff b/patches/dwm-noborder-6.2.diff new file mode 100644 index 0000000..f381eb8 --- /dev/null +++ b/patches/dwm-noborder-6.2.diff @@ -0,0 +1,30 @@ +From 9102fdb9c670218373bbe83c891c8e8138d6a6f4 Mon Sep 17 00:00:00 2001 +From: redacted +Date: Tue, 23 Apr 2019 00:39:27 +0100 +Subject: [PATCH] added noborder patch + +--- + dwm.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/dwm.c b/dwm.c +index 4465af1..685eca1 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -1282,6 +1282,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->isfloating) { ++ 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); +-- +2.21.0 +