From: Dana Jansens Date: Tue, 9 Sep 2003 08:05:06 +0000 (+0000) Subject: save teh client for interactive actions cuz after teh keyboard is grabbed there is... X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=3fcba81510c98ac517afbab0ba60ced3d30f202f;p=chaz%2Fopenbox save teh client for interactive actions cuz after teh keyboard is grabbed there is no client --- diff --git a/openbox/event.c b/openbox/event.c index 79d35077..2d47fd32 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -488,7 +488,7 @@ static void event_process(const XEvent *ec, gpointer data) if (menu_frame_visible) event_handle_menu(e); else { - if (!keyboard_process_interactive_grab(e)) { + if (!keyboard_process_interactive_grab(e, &client)) { if (moveresize_in_progress) moveresize_event(e); diff --git a/openbox/keyboard.c b/openbox/keyboard.c index fe13c97b..d044ba5c 100644 --- a/openbox/keyboard.c +++ b/openbox/keyboard.c @@ -157,7 +157,7 @@ void keyboard_interactive_grab(guint state, ObClient *client, interactive_states = g_slist_append(interactive_states, s); } -gboolean keyboard_process_interactive_grab(const XEvent *e) +gboolean keyboard_process_interactive_grab(const XEvent *e, ObClient **client) { GSList *it, *next; gboolean handled = FALSE; @@ -192,7 +192,8 @@ gboolean keyboard_process_interactive_grab(const XEvent *e) } handled = TRUE; - } + } else + *client = s->client; } return handled; diff --git a/openbox/keyboard.h b/openbox/keyboard.h index 61fe19e0..cf190d45 100644 --- a/openbox/keyboard.h +++ b/openbox/keyboard.h @@ -22,7 +22,8 @@ void keyboard_reset_chains(); void keyboard_interactive_grab(guint state, struct _ObClient *client, struct _ObAction *action); -gboolean keyboard_process_interactive_grab(const XEvent *e); +gboolean keyboard_process_interactive_grab(const XEvent *e, + struct _ObClient **client); void keyboard_grab_for_client(struct _ObClient *c, gboolean grab);