summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-13 18:27:58 +0000
committerDana Jansens <danakj@orodu.net>2007-05-13 18:27:58 +0000
commite28cbd61c121b989b5cd183122b998691ceafc93 (patch)
tree3f1e9cd15a67047199f3328ac2b47404ca170120 /openbox
parent3fab62255cf90fa84084390e96464b64fc5edaa5 (diff)
kill grabs before xsetinputfocus
Diffstat (limited to 'openbox')
-rw-r--r--openbox/focus.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/openbox/focus.c b/openbox/focus.c
index b084d357..a756a9b5 100644
--- a/openbox/focus.c
+++ b/openbox/focus.c
@@ -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);