diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-13 15:29:49 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-13 15:29:49 +0000 |
| commit | 56d7bc50f0da9fe694b20751fa67aaa7e9158967 (patch) | |
| tree | ee770ebda41fd124383a9fadd73202e49010fbdd /openbox/client.c | |
| parent | acfa2af3c2eacd099869cc5aebdcfa1241214e8b (diff) | |
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
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 10 |
1 files changed, 10 insertions, 0 deletions
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. */ |
