[wiki] [sites] [dwm][patch][removeborder] fix multi monitor || Michael Peters

From: <git_AT_suckless.org>
Date: Mon, 27 Jun 2022 02:15:44 +0200

commit de37d88f34a7c2558551c166a26bfe924cb2d6fb
Author: Michael Peters <chrisfrog_AT_protonmail.com>
Date: Sun Jun 26 19:12:00 2022 -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.

diff --git a/dwm.suckless.org/patches/removeborder/dwm-removeborder-20200520-f09418b.diff b/dwm.suckless.org/patches/removeborder/dwm-removeborder-20220626-d3f93c7.diff
similarity index 70%
rename from dwm.suckless.org/patches/removeborder/dwm-removeborder-20200520-f09418b.diff
rename to dwm.suckless.org/patches/removeborder/dwm-removeborder-20220626-d3f93c7.diff
index 73d75f4f..9193a77c 100644
--- a/dwm.suckless.org/patches/removeborder/dwm-removeborder-20200520-f09418b.diff
+++ b/dwm.suckless.org/patches/removeborder/dwm-removeborder-20220626-d3f93c7.diff
_AT_@ -1,8 +1,8 @@
 diff --git a/dwm.c b/dwm.c
-index 4465af1..f869429 100644
+index 5646a5c..27e29df 100644
 --- a/dwm.c
 +++ b/dwm.c
-_AT_@ -1276,12 +1276,26 @@ void
+_AT_@ -1283,12 +1283,26 @@ void
  resizeclient(Client *c, int x, int y, int w, int h)
  {
          XWindowChanges wc;
_AT_@ -15,11 +15,11 @@ index 4465af1..f869429 100644
          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++);
++ for (n = 0, nbc = nexttiled(c->mon->clients); nbc; nbc = nexttiled(nbc->next), n++);
 +
-+ if (c->isfloating || selmon->lt[selmon->sellt]->arrange == NULL) {
++ if (c->isfloating || c->mon->lt[c->mon->sellt]->arrange == NULL) {
 + } else {
-+ if (selmon->lt[selmon->sellt]->arrange == monocle || n == 1) {
++ 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;
diff --git a/dwm.suckless.org/patches/removeborder/index.md b/dwm.suckless.org/patches/removeborder/index.md
index 66f1e6a6..78c421dc 100644
--- a/dwm.suckless.org/patches/removeborder/index.md
+++ b/dwm.suckless.org/patches/removeborder/index.md
_AT_@ -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_AT_cdrateline.com>
 * Cássio Ávila - <cassioavila_AT_yandex.com> (window dimensions fix)
+* Michael Peters - <chrisfrog_AT_protonmail.com> (multi monitor fix)
Received on Mon Jun 27 2022 - 02:15:44 CEST

This archive was generated by hypermail 2.3.0 : Mon Jun 27 2022 - 02:24:37 CEST