dwm

[fork] dynamic window manager
Log | Files | Refs | README | LICENSE

commit 08694ed9fd04ea671c01aa8b290bd82a386044cd
parent f8056b9384bb73442d52a492fa0335d625413205
Author: hhvn <dev@hhvn.uk>
Date:   Wed, 23 Mar 2022 13:54:03 +0000

Add changes from origin/master

Diffstat:
Mdwm.c | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/dwm.c b/dwm.c @@ -481,6 +481,7 @@ cleanup(void) drw_cur_free(drw, cursor[i]); for (i = 0; i < LENGTH(colors) + 1; i++) free(scheme[i]); + free(scheme); XDestroyWindow(dpy, wmcheckwin); drw_free(drw); XSync(dpy, False); @@ -1194,7 +1195,7 @@ manage(Window w, XWindowAttributes *wa) XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); if (!c->isfloating) - c->isfloating = c->oldstate = trans != None || c->isfixed; + c->isfloating = c->oldstate = t || c->isfixed; if (c->isfloating) XRaiseWindow(dpy, c->win); attachaside(c); @@ -1716,11 +1717,13 @@ tile(Monitor *m) if (i < m->nmaster) { h = (m->wh - my) / (MIN(n, m->nmaster) - i) - m->gappx; resize(c, m->wx + m->gappx, m->wy + my, mw - (2*c->bw) - m->gappx, h - (2*c->bw), 0); - my += HEIGHT(c) + m->gappx; + if (my + HEIGHT(c) + m->gappx < m->wh) + my += HEIGHT(c) + m->gappx; } else { h = (m->wh - ty) / (n - i) - m->gappx; resize(c, m->wx + mw + m->gappx, m->wy + ty, m->ww - mw - (2*c->bw) - (2*m->gappx), h - (2*c->bw), 0); - ty += HEIGHT(c) + m->gappx; + if (ty + HEIGHT(c) + m->gappx < m->wh) + ty += HEIGHT(c) + m->gappx; } }