aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dwm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dwm.c b/dwm.c
index fb1e326..9fd0286 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1689,11 +1689,13 @@ tile(Monitor *m)
if (i < m->nmaster) {
h = (m->wh - my) / (MIN(n, m->nmaster) - i);
resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0);
- my += HEIGHT(c);
+ if (my + HEIGHT(c) < m->wh)
+ my += HEIGHT(c);
} else {
h = (m->wh - ty) / (n - i);
resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0);
- ty += HEIGHT(c);
+ if (ty + HEIGHT(c) < m->wh)
+ ty += HEIGHT(c);
}
}
remember that computers suck.