]> Dogcows Code - chaz/openbox/blobdiff - openbox/keyboard.c
ungrab only as many times as we grabbed
[chaz/openbox] / openbox / keyboard.c
index 1f509f77ff8c5e61aa0544690053f95faea16b3d..cef0dfd68364179545010102d024c43a8b416e56 100644 (file)
@@ -186,12 +186,15 @@ gboolean keyboard_process_interactive_grab(const XEvent *e,
 
             s->action->func(&s->action->data);
 
-            grab_keyboard(FALSE);
-            grab_pointer(FALSE, OB_CURSOR_NONE);
-            keyboard_reset_chains();
-
             g_free(s);
+
             interactive_states = g_slist_delete_link(interactive_states, it);
+            if (!interactive_states) {
+                grab_keyboard(FALSE);
+                grab_pointer(FALSE, OB_CURSOR_NONE);
+                keyboard_reset_chains();
+            }
+
             handled = TRUE;
         }
     }
This page took 0.019999 seconds and 4 git commands to generate.