- if (grab_on_keyboard())
- inter = TRUE;
- else
- for (it = acts; it; it = g_slist_next(it)) {
- a = it->data;
- if (a->data.any.interactive) {
- inter = TRUE;
- break;
- }
- }
-
- if (!inter && button == 0) {
- /* Ungrab the keyboard before running the action, if it was
- not from a mouse event.
-
- We have to do this because a key press causes a passive
- grab on the keyboard, and so if the action we are running
- wants to grab the keyboard, it will fail if the button is still
- held down (which is likely).
-
- Use the X function not out own, because we're not considering
- a grab to be in place at all so our function won't try ungrab
- anything.
- */
- XUngrabKeyboard(ob_display, time);
- }
-