]> Dogcows Code - chaz/openbox/blobdiff - openbox/keyboard.c
gracefully handle grabs failing when doing interactive actions
[chaz/openbox] / openbox / keyboard.c
index 11b3a98509a058fa6964384342f123f117b13fbc..05d40cd06b1801c8501c4e1a0818a0d1d4b5d90b 100644 (file)
@@ -155,8 +155,8 @@ gboolean keyboard_bind(GList *keylist, ObAction *action)
     return TRUE;
 }
 
-void keyboard_interactive_grab(guint state, ObClient *client,
-                               ObAction *action)
+gboolean keyboard_interactive_grab(guint state, ObClient *client,
+                                   ObAction *action)
 {
     ObInteractiveState *s;
 
@@ -164,10 +164,10 @@ void keyboard_interactive_grab(guint state, ObClient *client,
 
     if (!interactive_states) {
         if (!grab_keyboard(TRUE))
-            return;
+            return FALSE;
         if (!grab_pointer(TRUE, OB_CURSOR_NONE)) {
             grab_keyboard(FALSE);
-            return;
+            return FALSE;
         }
     }
 
@@ -178,6 +178,8 @@ void keyboard_interactive_grab(guint state, ObClient *client,
     s->actions = g_slist_append(NULL, action);
 
     interactive_states = g_slist_append(interactive_states, s);
+
+    return TRUE;
 }
 
 void keyboard_interactive_end(ObInteractiveState *s,
This page took 0.021859 seconds and 4 git commands to generate.