JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
remove the ev->state check in enternotify()
authorRyan McBride <mcbride@countersiege.com>
Tue, 27 Oct 2009 10:49:47 +0000 (10:49 +0000)
committerRyan McBride <mcbride@countersiege.com>
Tue, 27 Oct 2009 10:49:47 +0000 (10:49 +0000)
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

index 6132292..5d7a74b 100644 (file)
--- 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;
        }