]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
ignore crossing events while an interactive grab is going on.
[chaz/openbox] / openbox / event.c
index 7c85e8429d8c5f7c94f5251fa44f7c9e0df20c80..1f5bae13287b6427cc29cc0b2e17dcc1fc33db89 100644 (file)
@@ -387,9 +387,7 @@ static gboolean event_ignore(XEvent *e, ObClient *client)
     switch(e->type) {
     case EnterNotify:
     case LeaveNotify:
-        if (e->xcrossing.detail == NotifyInferior)
-            return TRUE;
-        break;
+        return keyboard_interactively_grabbed();
     case FocusIn:
     case FocusOut:
         /* I don't think this should ever happen with our event masks, but
@@ -473,7 +471,13 @@ static void event_process(const XEvent *ec, gpointer data)
             ed->ignored = FALSE;
 
     /* deal with it in the kernel */
-    if (group)
+
+    if (menu_frame_visible &&
+        (e->type == EnterNotify || e->type == LeaveNotify))
+    {
+        /* crossing events for menu */
+        event_handle_menu(e);
+    } else if (group)
         event_handle_group(group, e);
     else if (client)
         event_handle_client(client, e);
@@ -506,11 +510,6 @@ static void event_process(const XEvent *ec, gpointer data)
         xerror_set_ignore(FALSE);
     }
 
-    /* crossing events for menu */
-    if (e->type == EnterNotify || e->type == LeaveNotify)
-        if (menu_frame_visible)
-            event_handle_menu(e);
-
     /* user input (action-bound) events */
     if (e->type == ButtonPress || e->type == ButtonRelease ||
         e->type == MotionNotify || e->type == KeyPress ||
This page took 0.020542 seconds and 4 git commands to generate.