-gboolean keyboard_process_interactive_grab(const XEvent *e,
- ObClient **client,
- ObFrameContext *context)
+void keyboard_interactive_end(ObInteractiveState *s,
+ guint state, gboolean cancel)
+{
+ action_run_interactive(s->action, s->client, state, cancel, TRUE);
+
+ g_free(s);
+
+ interactive_states = g_slist_remove(interactive_states, s);
+
+ if (!interactive_states) {
+ grab_keyboard(FALSE);
+ grab_pointer(FALSE, OB_CURSOR_NONE);
+ keyboard_reset_chains();
+ }
+}
+
+void keyboard_interactive_end_client(gpointer data)
+{
+ GSList *it, *next;
+ ObClient *c = data;
+
+ for (it = interactive_states; it; it = next) {
+ ObInteractiveState *s = it->data;
+
+ next = g_slist_next(it);
+
+ if (s->client == c)
+ keyboard_interactive_end(s, 0, FALSE);
+ }
+}
+
+gboolean keyboard_process_interactive_grab(const XEvent *e, ObClient **client)