mfwm

A tiling fork of dylanaraps sowm.
git clone git://depsterr.com/git/mfwm
Log | Files | Refs | README | LICENSE

commit 7b876932a7b65bc1dd13a4187bbbc03a16740dcd
parent 4475ac5653bdfc37e75cd33ed104dd6b19215591
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Sun, 13 Oct 2019 17:45:44 +0300

docs: update

Diffstat:
Msowm.c | 20+++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/sowm.c b/sowm.c @@ -91,7 +91,8 @@ void notify_destroy(XEvent *e) { } void notify_enter(XEvent *e) { - XSetInputFocus(dis, e->xcrossing.window, RevertToParent, CurrentTime); + if (e->xcrossing.window != root) + XSetInputFocus(dis, e->xcrossing.window, RevertToParent, CurrentTime); } void notify_motion(XEvent *e) { @@ -207,7 +208,12 @@ void win_del(Window w) { void win_kill() { Window cur = win_current(); - if (cur != root) XKillClient(dis, cur); + if (cur != root) { + XKillClient(dis, cur); + win_del(cur); + + if (list) XSetInputFocus(dis, list->win, RevertToParent, CurrentTime); + } } void win_center(Window w) { @@ -248,20 +254,20 @@ void win_to_ws(const Arg arg) { win_del(cur); XUnmapWindow(dis, cur); ws_save(tmp); + + if (list) XSetInputFocus(dis, list->win, RevertToParent, CurrentTime); } void win_next() { Window cur = win_current(); client *c; - if (list) { - if (cur == root) cur = list->win; + if (cur == root) return; + if (list) { for WIN if (c->win == cur) break; - c = c->next; - - if (!c) c = list; + c = c->next ? c->next : list; XSetInputFocus(dis, c->win, RevertToParent, CurrentTime); XRaiseWindow(dis, c->win);