sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit de37d88f34a7c2558551c166a26bfe924cb2d6fb
parent 177a680c8ac6dfc0f991798e4d44b053f5641ca8
Author: Michael Peters <chrisfrog@protonmail.com>
Date:   Sun, 26 Jun 2022 19:12:00 -0500

[dwm][patch][removeborder] fix multi monitor

Previously, tagging a client from a monitor with >2 clients to a
monitor with 0 clients incorrectly drew a border on the target
client. Now, the target client will be drawn without a border.

Diffstat:
Ddwm.suckless.org/patches/removeborder/dwm-removeborder-20200520-f09418b.diff | 31-------------------------------
Adwm.suckless.org/patches/removeborder/dwm-removeborder-20220626-d3f93c7.diff | 31+++++++++++++++++++++++++++++++
Mdwm.suckless.org/patches/removeborder/index.md | 3++-
3 files changed, 33 insertions(+), 32 deletions(-)

diff --git a/dwm.suckless.org/patches/removeborder/dwm-removeborder-20200520-f09418b.diff b/dwm.suckless.org/patches/removeborder/dwm-removeborder-20200520-f09418b.diff @@ -1,31 +0,0 @@ -diff --git a/dwm.c b/dwm.c -index 4465af1..f869429 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -1276,12 +1276,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(selmon->clients); nbc; nbc = nexttiled(nbc->next), n++); -+ -+ if (c->isfloating || selmon->lt[selmon->sellt]->arrange == NULL) { -+ } else { -+ if (selmon->lt[selmon->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); diff --git a/dwm.suckless.org/patches/removeborder/dwm-removeborder-20220626-d3f93c7.diff b/dwm.suckless.org/patches/removeborder/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); diff --git a/dwm.suckless.org/patches/removeborder/index.md b/dwm.suckless.org/patches/removeborder/index.md @@ -7,9 +7,10 @@ Remove the border when there is only one window visible. Simpler reimplimentatio Download -------- -* [dwm-removeborder-20200520-f09418b.diff](dwm-removeborder-20200520-f09418b.diff) +* [dwm-removeborder-20220626-d3f93c7.diff](dwm-removeborder-20220626-d3f93c7.diff) Author ------- * Max Amundsen - <massimo@cdrateline.com> * Cássio Ávila - <cassioavila@yandex.com> (window dimensions fix) +* Michael Peters - <chrisfrog@protonmail.com> (multi monitor fix)