Fix gapps in column mode

This commit is contained in:
Przemek Grondek 2021-07-07 01:04:04 +02:00
parent c4ccdce0b6
commit 7a3a2c3cc1

6
dwm.c
View File

@ -2004,13 +2004,13 @@ col(Monitor *m) {
mw = m->ww - m->gappx;
for(i =0, x = y = m->gappx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
if(i < m->nmaster) {
w = (mw - x) / (MIN(n, m->nmaster)-i) - m->gappx;
resize(c, x + m->wx + m->gappx, m->wy + m->gappx, w - (2*c->bw) - (2*m->gappx), m->wh - ((2*c->bw) + (2*m->gappx)), False);
w = (mw - x) / (MIN(n, m->nmaster)-i);
resize(c, x + m->wx, m->wy + m->gappx, w - (2*c->bw), m->wh - ((2*c->bw) + (2*m->gappx)), False);
x += WIDTH(c) + m->gappx;
}
else {
h = (m->wh - y) / (n - i) - m->gappx;
resize(c, x + m->wx + m->gappx, m->wy + y, m->ww - x - (2*c->bw) - (2*m->gappx), h - (2*c->bw), False);
resize(c, x + m->wx, m->wy + y, m->ww - x - (2*c->bw) - m->gappx, h - (2*c->bw), False);
y += HEIGHT(c) + m->gappx;
}
}