]> Dogcows Code - chaz/openbox/blobdiff - openbox/menuframe.c
add grab/ungrab macros so dont need to pass in 10 arguments to ungrab stuff.
[chaz/openbox] / openbox / menuframe.c
index c6dd02fa3d8ec5a9e9ac21bfdab645207bbd6cc4..68ea49496a992b29750b70665f79b2dff84abaf8 100644 (file)
@@ -914,10 +914,10 @@ static gboolean menu_frame_show(ObMenuFrame *self)
 
         /* grab the pointer in such a way as to pass through "owner events"
            so that we can get enter/leave notifies in the menu. */
-        if (!grab_pointer(TRUE, TRUE, OB_CURSOR_POINTER))
+        if (!grab_pointer(TRUE, FALSE, OB_CURSOR_POINTER))
             return FALSE;
-        if (!grab_keyboard(TRUE)) {
-            grab_pointer(FALSE, TRUE, OB_CURSOR_POINTER);
+        if (!grab_keyboard()) {
+            ungrab_pointer();
             return FALSE;
         }
     }
@@ -1035,8 +1035,8 @@ void menu_frame_hide(ObMenuFrame *self)
 
     if (menu_frame_visible == NULL) {
         /* last menu shown */
-        grab_pointer(FALSE, TRUE, OB_CURSOR_NONE);
-        grab_keyboard(FALSE);
+        ungrab_pointer();
+        ungrab_keyboard();
     }
 
     XUnmapWindow(ob_display, self->window);
This page took 0.022581 seconds and 4 git commands to generate.