]> Dogcows Code - chaz/openbox/commitdiff
ignore another type of crossing event, caused when leaving gtk popup menus
authorDana Jansens <danakj@orodu.net>
Fri, 18 Apr 2003 21:56:53 +0000 (21:56 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 18 Apr 2003 21:56:53 +0000 (21:56 +0000)
openbox/event.c

index 1db1829c402a7478620dfea9e67ff8f5b1aa617f..337841acd6e65e0036a4a565c1ce73971a2257fe 100644 (file)
@@ -333,12 +333,24 @@ static gboolean event_ignore(XEvent *e, Client *client)
     case LeaveNotify:
         /* NotifyUngrab occurs when a mouse button is released and the event is
            caused, like when lowering a window */
-        /* NotifyVirtual occurs when ungrabbing the pointer */
+        /* NotifyVirtual occurs when ungrabbing the pointer,
+           NotifyNonlinearVirtual occurs when closing a gtk app's menu */
         if (e->xcrossing.mode == NotifyGrab ||
             e->xcrossing.detail == NotifyInferior ||
             (e->xcrossing.mode == NotifyUngrab &&
-             e->xcrossing.detail == NotifyVirtual))
+             (e->xcrossing.detail == NotifyVirtual ||
+              e->xcrossing.detail == NotifyNonlinearVirtual))) {
+#ifdef DEBUG_FOCUS
+            g_message("EnterNotify mode %d detail %d on %lx IGNORED",
+                      e->xcrossing.mode,
+                      e->xcrossing.detail, client?client->window:0);
+#endif
             return TRUE;
+        }
+#ifdef DEBUG_FOCUS
+        g_message("EnterNotify mode %d detail %d on %lx", e->xcrossing.mode,
+                  e->xcrossing.detail, client?client->window:0);
+#endif
        break;
     }
     return FALSE;
This page took 0.02696 seconds and 4 git commands to generate.