mfwm

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

commit 6a560c413a84485b4d42b6dc06d3dc49ee81524b
parent 6167924df222d4f2ac5f3015b049dee66b8d25ac
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Mon, 14 Oct 2019 09:06:41 +0300

sowm: fix focus bug

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

diff --git a/sowm.c b/sowm.c @@ -80,10 +80,16 @@ static void (*events[LASTEvent])(XEvent *e) = { [MotionNotify] = notify_motion }; +Window win_current() { + XGetInputFocus(d, &cur, &j); + return cur; +} + void notify_destroy(XEvent *e) { win_del(e->xdestroywindow.window); + win_current(); - if (list) FOC(list->w); + if (list) FOC(cur == root ? list->w : cur); } void notify_enter(XEvent *e) { @@ -138,11 +144,6 @@ void button_release() { mouse.subwindow = None; } -Window win_current() { - XGetInputFocus(d, &cur, &j); - return cur; -} - void win_add(Window w) { client *c, *t;