From 410c65e51c167d52807cdf6473db25077ca43e85 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 14 Oct 2019 20:53:00 +0300 Subject: [PATCH] compress enter events and clean up code --- sowm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sowm.c b/sowm.c index f0557ec..6a8ac2a 100644 --- a/sowm.c +++ b/sowm.c @@ -91,6 +91,8 @@ void notify_destroy(XEvent *e) { } void notify_enter(XEvent *e) { + while(XCheckTypedEvent(d, EnterNotify, e)); + if (e->xcrossing.window != root) FOC(e->xcrossing.window) } @@ -196,9 +198,7 @@ void win_del(Window w) { } void win_kill() { - win_current(); - - if (cur != root) XKillClient(d, cur); + if (win_current() != root) XKillClient(d, cur); } void win_center(Window w) {