]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
changes to the manual pages.
[chaz/openbox] / openbox / client.c
index b3f1368498a322d88a9e8275e46e99ed89da9e47..837dd0194a74a8ed4e74a362f8f91e0452f9a3b3 100644 (file)
@@ -2421,6 +2421,18 @@ gboolean client_hide(ObClient *self)
     gboolean hide = FALSE;
 
     if (!client_should_show(self)) {
+        if (self == focus_client) {
+            /* 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();
+        }
+
         frame_hide(self->frame);
         hide = TRUE;
     }
@@ -3343,13 +3355,15 @@ gboolean client_focus(ObClient *self)
                   "Focusing client \"%s\" at time %u\n",
                   self->title, event_curtime);
 
-    /* if we move focus during a grab, applications will get
-       NotifyWhileGrabbed events and ignore them !
+    /* 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 !
 
-       interactive actions should not do anything that can move focus until
-       their finishing.
+       actions should not rely on being able to move focus during an
+       interactive grab.
     */
-    g_assert(keyboard_interactively_grabbed());
+    if (keyboard_interactively_grabbed())
+        keyboard_interactive_cancel();
 
     error = FALSE;
     xerror_set_ignore(TRUE);
This page took 0.023484 seconds and 4 git commands to generate.