commit 0f7d4d638a77f35672a103483121d86b0732c2d3
Author: Cássio Ribeiro Alves de Ávila <[email protected]>
Date:   Sat May 1 07:50:27 2021 -0300

    [dwm][patch][removeborder] Fix wrong window dimensions
    
    The original patch just removes the border, and doesn't increase the
    dimensions of the window, leaving a space at the bottom.

diff --git 
a/dwm.suckless.org/patches/removeborder/dwm-removeborder-20200520-f09418b.diff 
b/dwm.suckless.org/patches/removeborder/dwm-removeborder-20200520-f09418b.diff
index 5414d6b2..73d75f4f 100644
--- 
a/dwm.suckless.org/patches/removeborder/dwm-removeborder-20200520-f09418b.diff
+++ 
b/dwm.suckless.org/patches/removeborder/dwm-removeborder-20200520-f09418b.diff
@@ -1,13 +1,13 @@
 diff --git a/dwm.c b/dwm.c
-index 9fd0286..dcdbc38 100644
+index 4465af1..f869429 100644
 --- a/dwm.c
 +++ b/dwm.c
-@@ -1277,12 +1277,24 @@ void
+@@ -1276,12 +1276,26 @@ void
  resizeclient(Client *c, int x, int y, int w, int h)
  {
        XWindowChanges wc;
-+    unsigned int n;
-+    Client *nbc;
++      unsigned int n;
++      Client *nbc;
  
        c->oldx = c->x; c->x = wc.x = x;
        c->oldy = c->y; c->y = wc.y = y;
@@ -15,14 +15,16 @@ index 9fd0286..dcdbc38 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(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;
-+           }
-+    }
++      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);
diff --git a/dwm.suckless.org/patches/removeborder/index.md 
b/dwm.suckless.org/patches/removeborder/index.md
index 4af52145..66f1e6a6 100644
--- a/dwm.suckless.org/patches/removeborder/index.md
+++ b/dwm.suckless.org/patches/removeborder/index.md
@@ -12,3 +12,4 @@ Download
 Author
 -------
 * Max Amundsen - <[email protected]>
+* Cássio Ávila - <[email protected]> (window dimensions fix)


Reply via email to