diff options
author | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2024-03-20 11:56:18 +0100 |
---|---|---|
committer | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2024-03-20 11:56:18 +0100 |
commit | 15663cf4d0666670ff1dffcac9d56aef87752c3f (patch) | |
tree | ef6de4c178d2d8ffaa257b5df2e040bccdd48df9 /dwm/dwm.c.rej |
a
Diffstat (limited to 'dwm/dwm.c.rej')
-rwxr-xr-x | dwm/dwm.c.rej | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/dwm/dwm.c.rej b/dwm/dwm.c.rej new file mode 100755 index 0000000..96cdbd9 --- /dev/null +++ b/dwm/dwm.c.rej @@ -0,0 +1,39 @@ +--- dwm.c ++++ dwm.c +@@ -1703,7 +1703,7 @@ textnw(const char *text, unsigned int len) { + + void + tile(Monitor *m) { +- unsigned int i, n, h, mw, my, ty; ++ unsigned int i, n, h, r, g = 0, mw, my, ty; + Client *c; + + for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); +@@ -1711,19 +1711,21 @@ tile(Monitor *m) { + return; + + if(n > m->nmaster) +- mw = m->nmaster ? m->ww * m->mfact : 0; ++ mw = m->nmaster ? (m->ww - (g = gappx)) * m->mfact : 0; + else + mw = m->ww; + for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) + if(i < m->nmaster) { +- h = (m->wh - my) / (MIN(n, m->nmaster) - i); ++ r = MIN(n, m->nmaster) - i; ++ h = (m->wh - my - gappx * (r - 1)) / r; + resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), False); +- my += HEIGHT(c); ++ my += HEIGHT(c) + gappx; + } + 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), False); +- ty += HEIGHT(c); ++ r = n - i; ++ h = (m->wh - ty - gappx * (r - 1)) / r; ++ resize(c, m->wx + mw + g, m->wy + ty, m->ww - mw - g - (2*c->bw), h - (2*c->bw), False); ++ ty += HEIGHT(c) + gappx; + } + } + |