]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
don't allow focus to move during an interactive grab. if users set up actions
[chaz/openbox] / openbox / client.c
index 73696c897518dd98fce6f51df139dc7a16a21bfb..7a01e5109bce9b580b32b173f6056b3e0a315088 100644 (file)
@@ -3397,6 +3397,16 @@ gboolean client_focus(ObClient *self)
                   "Focusing client \"%s\" at time %u\n",
                   self->title, event_curtime);
 
+    /* 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();
+
     if (self->can_focus) {
         /* This can cause a BadMatch error with CurrentTime, or if an app
            passed in a bad time for _NET_WM_ACTIVE_WINDOW. */
This page took 0.021096 seconds and 4 git commands to generate.