diff --git a/dwm b/dwm index 0fe83e1..dd5ef4d 100755 Binary files a/dwm and b/dwm differ diff --git a/dwm.o b/dwm.o index 3a7a43d..b86c61e 100644 Binary files a/dwm.o and b/dwm.o differ diff --git a/layouts.c b/layouts.c index 6eee93b..eed9e4b 100644 --- a/layouts.c +++ b/layouts.c @@ -44,16 +44,16 @@ gaplessgrid(Monitor *m) { rows = n/cols; /* window geometries */ - cw = cols ? m->ww / cols : m->ww; + cw = cols ? (m->ww - m->gappx) / cols : m->ww - m->gappx; cn = 0; /* current column number */ rn = 0; /* current row number */ for(i = 0, c = nexttiled(m->clients); c; i++, c = nexttiled(c->next)) { if(i/rows + 1 > cols - n%cols) rows = n/cols + 1; - ch = rows ? m->wh / rows : m->wh; + ch = rows ? (m->wh - m->gappx) / rows : m->wh - m->gappx; cx = m->wx + cn*cw; cy = m->wy + rn*ch; - resize(c, cx, cy, cw - 2 * c->bw, ch - 2 * c->bw, False); + resize(c, cx + m->gappx, cy + m->gappx, cw - 2 * c->bw - m->gappx, ch - 2 * c->bw - m->gappx, False); rn++; if(rn >= rows) { rn = 0;