From 56d7bc50f0da9fe694b20751fa67aaa7e9158967 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 13 May 2007 15:29:49 +0000 Subject: don't allow focus to move during an interactive grab. if users set up actions such that this would happen, then kill the interactive grab before moving focus. this is to avoid NotifyWhileGrabbed FocusOut's --- openbox/client.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'openbox/client.c') diff --git a/openbox/client.c b/openbox/client.c index 73696c89..7a01e510 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -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. */ -- cgit v1.2.3