don't assert, users can bind stuff however they like. but if they do something that moves focus during an interactive action, kill the grab

This commit is contained in:
Dana Jansens 2007-05-14 23:32:50 +00:00
parent b7827484ef
commit 47c8d40729

View file

@ -3343,13 +3343,15 @@ gboolean client_focus(ObClient *self)
"Focusing client \"%s\" at time %u\n", "Focusing client \"%s\" at time %u\n",
self->title, event_curtime); self->title, event_curtime);
/* if we move focus during a grab, applications will get /* if there is a grab going on, then we need to cancel it. if we move
NotifyWhileGrabbed events and ignore them ! focus during the grab, applications will get NotifyWhileGrabbed events
and ignore them !
interactive actions should not do anything that can move focus until actions should not rely on being able to move focus during an
their finishing. interactive grab.
*/ */
g_assert(!keyboard_interactively_grabbed()); if (keyboard_interactively_grabbed())
keyboard_interactive_cancel();
error = FALSE; error = FALSE;
xerror_set_ignore(TRUE); xerror_set_ignore(TRUE);