]> Dogcows Code - chaz/openbox/commitdiff
kill grabs before xsetinputfocus
authorDana Jansens <danakj@orodu.net>
Sun, 13 May 2007 18:27:58 +0000 (18:27 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 13 May 2007 18:27:58 +0000 (18:27 +0000)
openbox/focus.c

index b084d35721fc08629854e84ca229e75afd10cf29..a756a9b5484841d7a54fb62dc46809a1bbe89c2d 100644 (file)
@@ -309,6 +309,16 @@ void focus_nothing()
     focus_client = NULL;
     focus_tried = NULL; /* focus isn't "trying" to go anywhere now */
 
+    /* if there is a grab going on, then we need to cancel it. if we move
+       focus during the grab, applications will get NotifyWhileGrabbed events
+       and ignore them !
+
+       actions should not rely on being able to move focus during an
+       interactive grab.
+    */
+    if (keyboard_interactively_grabbed())
+        keyboard_interactive_cancel();
+
     /* when nothing will be focused, send focus to the backup target */
     XSetInputFocus(ob_display, screen_support_win, RevertToPointerRoot,
                    event_curtime);
This page took 0.022343 seconds and 4 git commands to generate.