]> Dogcows Code - chaz/openbox/blobdiff - openbox/client_menu.c
super correct enter event ignoring that will only ignore what it has to, yay?
[chaz/openbox] / openbox / client_menu.c
index 6fa744c41b8545790886c873251a921e4b4f7b6a..db00265c4fe71db70d92e32d5c6a29400214028d 100644 (file)
@@ -119,19 +119,15 @@ static void client_menu_execute(ObMenuEntry *e, ObMenuFrame *f,
         break;
     case CLIENT_RESTORE:
         client_maximize(c, FALSE, 0);
-        event_ignore_queued_enters();
         break;
     case CLIENT_MAXIMIZE:
         client_maximize(c, TRUE, 0);
-        event_ignore_queued_enters();
         break;
     case CLIENT_SHADE:
         client_shade(c, !c->shaded);
-        event_ignore_queued_enters();
         break;
     case CLIENT_DECORATE:
         client_set_undecorated(c, !c->undecorated);
-        event_ignore_queued_enters();
         break;
     case CLIENT_MOVE:
         /* this needs to grab the keyboard so hide the menu */
@@ -158,6 +154,10 @@ static void client_menu_execute(ObMenuEntry *e, ObMenuFrame *f,
         g_assert_not_reached();
     }
 
+    /* we have to ignore all queued enters because the menu has a grab, and the
+       so the cursor isnt considered inside the client's window */
+    event_ignore_all_queued_enters();
+
     /* update the menu cuz stuff can have changed */
     if (f) {
         client_menu_update(f, NULL);
@@ -217,7 +217,9 @@ static void layer_menu_execute(ObMenuEntry *e, ObMenuFrame *f,
         g_assert_not_reached();
     }
 
-    event_ignore_queued_enters();
+    /* we have to ignore all queued enters because the menu has a grab, and the
+       so the cursor isnt considered inside the client's window */
+    event_ignore_all_queued_enters();
 
     /* update the menu cuz stuff can have changed */
     if (f) {
This page took 0.022742 seconds and 4 git commands to generate.