From 1aca1ca9d68ba4740755e96680383d4a42308c28 Mon Sep 17 00:00:00 2001 From: Ryan McBride Date: Tue, 27 Oct 2009 10:49:47 +0000 Subject: [PATCH] remove the ev->state check in enternotify() ev->state indicates the state of the buttons and modifier keys, so it's not just workspace changes but any time these buttons are down. This heuristic breaks focus with mouse buttons down and when creating new terminals with m-s-enter, among other things. --- scrotwm.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scrotwm.c b/scrotwm.c index 6132292..5d7a74b 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -3954,11 +3954,8 @@ enternotify(XEvent *e) * feature */ - /* - * state is set when we are switching workspaces and focus is set when - * scrotwm launches via a restart - */ - if (ev->state || ev->focus) { + /* Focus is set when the window being entered already has focus. */ + if (ev->focus) { DNPRINTF(SWM_D_EVENT, "ignoring enternotify: focus\n"); return; } -- 1.7.10.4