diff options
Diffstat (limited to 'dwm.c')
-rw-r--r-- | dwm.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -657,23 +657,23 @@ bstack(Monitor *m) { if (n == 0) return; if (n > m->nmaster) { - mh = m->nmaster ? m->mfact * m->wh - m->gappx : 0; - tw = m->ww / (n - m->nmaster) - m->gappx; - ty = m->wy + mh; + mh = m->nmaster ? m->mfact * m->wh : 0; + tw = m->ww / (n - m->nmaster); + ty = m->wy + mh + m->gappx; } else { mh = m->wh; - tw = m->ww; - ty = m->wy; + tw = m->ww - m->gappx; + ty = m->wy - m->gappx; } - for (i = mx = m->gappx, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { + for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { if (i < m->nmaster) { w = (m->ww - mx) / (MIN(n, m->nmaster) - i) - m->gappx; - resize(c, m->wx + mx + m->gappx, m->wy, w - (2 * c->bw) - m->gappx, mh - (2 * c->bw), 0); + resize(c, m->wx + mx + m->gappx, m->wy + m->gappx, w - (2 * c->bw) - m->gappx, mh - (2 * c->bw) - m->gappx, 0); mx += WIDTH(c) + m->gappx; } else { h = m->wh - mh - m->gappx; - resize(c, tx + m->gappx, ty, tw - (2 * c->bw) - 2 * m->gappx, h - (2 * c->bw), 0); - if (tw + m->gappx != m->ww) + resize(c, tx + m->gappx, ty, tw - (2 * c->bw) - 2 * m->gappx, h - (2 * c->bw) - m->gappx, 0); + // if (tw != m->ww) tx += WIDTH(c) + m->gappx; } } |