sites

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

commit 0f7d4d638a77f35672a103483121d86b0732c2d3
parent 1969b2dadb7ec9994542c77d0d530c9cb23200e9
Author: Cássio Ribeiro Alves de Ávila <cassioavila@yandex.com>
Date:   Sat,  1 May 2021 07:50:27 -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.

Diffstat:
Mdwm.suckless.org/patches/removeborder/dwm-removeborder-20200520-f09418b.diff | 24+++++++++++++-----------
Mdwm.suckless.org/patches/removeborder/index.md | 1+
2 files changed, 14 insertions(+), 11 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,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 @@ -12,3 +12,4 @@ Download Author ------- * Max Amundsen - <massimo@cdrateline.com> +* Cássio Ávila - <cassioavila@yandex.com> (window dimensions fix)