]> Dogcows Code - chaz/openbox/commitdiff
Grab key bindings with GrabModeSync, so that if they lead to a keyboard grab, then...
authorDana Jansens <danakj@orodu.net>
Mon, 18 Feb 2008 20:55:59 +0000 (15:55 -0500)
committerDana Jansens <danakj@orodu.net>
Tue, 19 Feb 2008 01:42:35 +0000 (20:42 -0500)
openbox/grab.c
openbox/keyboard.c

index 43e9a8155a6bfeb3eb5dcb384be6d2f0278a7e20..214666e58de9909df8bd15470772fca2d3253972 100644 (file)
@@ -222,7 +222,7 @@ void ungrab_passive_key(void)
 {
     /*ob_debug("ungrabbing %d passive grabs\n", passive_count);*/
     if (passive_count) {
-        /* kill out passive grab */
+        /* kill our passive grab */
         XUngrabKeyboard(ob_display, event_curtime);
         passive_count = 0;
     }
index c23d83e627881bb7180d57e6e232ce08b23fa5f5..c318a4cf14b0f0b31dbf5ed8f5c638811c80d191 100644 (file)
@@ -53,13 +53,13 @@ static void grab_keys(gboolean grab)
         while (p) {
             if (p->key)
                 grab_key(p->key, p->state, RootWindow(ob_display, ob_screen),
-                         GrabModeAsync);
+                         GrabModeSync);
             p = p->next_sibling;
         }
         if (curpos)
             grab_key(config_keyboard_reset_keycode,
                      config_keyboard_reset_state,
-                     RootWindow(ob_display, ob_screen), GrabModeAsync);
+                     RootWindow(ob_display, ob_screen), GrabModeSync);
     }
 }
 
@@ -263,6 +263,8 @@ void keyboard_event(ObClient *client, const XEvent *e)
         }
         p = p->next_sibling;
     }
+
+    XAllowEvents(ob_display, AsyncKeyboard, event_curtime);
 }
 
 static void node_rebind(KeyBindingTree *node)
This page took 0.024555 seconds and 4 git commands to generate.