From 85ac75583f722d05d751f84b36dbcb0196391dd6 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 12 Oct 2019 12:48:50 +0300 Subject: [PATCH] sowm: fix focus --- sowm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sowm.c b/sowm.c index bfcf85f..ad3ee43 100644 --- a/sowm.c +++ b/sowm.c @@ -226,7 +226,14 @@ void win_update() { } void notify_enter(XEvent *e) { - XSetInputFocus(dis, e->xcrossing.window, RevertToParent, CurrentTime); + client *c; + + for (c=head;c;c=c->next) + if (e->xcrossing.window == c->win) + cur = c; + + if (cur != NULL && head != NULL) + win_update(); } void key_grab() {