From: Dana Jansens Date: Thu, 4 Sep 2003 00:39:05 +0000 (+0000) Subject: ungrab only as many times as we grabbed X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=bd41f6ee1e0904311fe5ce01aab8bff104e0a27e;p=chaz%2Fopenbox ungrab only as many times as we grabbed --- diff --git a/openbox/keyboard.c b/openbox/keyboard.c index 1f509f77..cef0dfd6 100644 --- a/openbox/keyboard.c +++ b/openbox/keyboard.c @@ -186,12 +186,15 @@ gboolean keyboard_process_interactive_grab(const XEvent *e, s->action->func(&s->action->data); - grab_keyboard(FALSE); - grab_pointer(FALSE, OB_CURSOR_NONE); - keyboard_reset_chains(); - g_free(s); + interactive_states = g_slist_delete_link(interactive_states, it); + if (!interactive_states) { + grab_keyboard(FALSE); + grab_pointer(FALSE, OB_CURSOR_NONE); + keyboard_reset_chains(); + } + handled = TRUE; } }