From: Ryan McBride Date: Tue, 27 Oct 2009 10:49:47 +0000 (+0000) Subject: remove the ev->state check in enternotify() X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=1aca1ca9d68ba4740755e96680383d4a42308c28;p=spectrwm.git 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. --- 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; }