a->data.inter.cancel = cancel;
a->data.inter.final = done;
if (!(cancel || done))
- keyboard_interactive_grab(state, a->data.any.c, a);
+ if (!keyboard_interactive_grab(state, a->data.any.c, a))
+ continue;
/* interactive actions are not queued */
a->func(&a->data);
return TRUE;
}
-void keyboard_interactive_grab(guint state, ObClient *client,
- ObAction *action)
+gboolean keyboard_interactive_grab(guint state, ObClient *client,
+ ObAction *action)
{
ObInteractiveState *s;
if (!interactive_states) {
if (!grab_keyboard(TRUE))
- return;
+ return FALSE;
if (!grab_pointer(TRUE, OB_CURSOR_NONE)) {
grab_keyboard(FALSE);
- return;
+ return FALSE;
}
}
s->actions = g_slist_append(NULL, action);
interactive_states = g_slist_append(interactive_states, s);
+
+ return TRUE;
}
void keyboard_interactive_end(ObInteractiveState *s,
void keyboard_event(struct _ObClient *client, const XEvent *e);
void keyboard_reset_chains();
-void keyboard_interactive_grab(guint state, struct _ObClient *client,
- struct _ObAction *action);
+gboolean keyboard_interactive_grab(guint state, struct _ObClient *client,
+ struct _ObAction *action);
gboolean keyboard_process_interactive_grab(const XEvent *e,
struct _ObClient **client);