X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Factions.c;h=125084e8c5ee7c9e776ba60f0a9d40301b5556b7;hb=53430914f0ac7e4e06a484d1fa3b0cf6a79df60b;hp=463962a25c26410a91f63f7874e3e9cb787f6af8;hpb=9a826d8c3d61150ddd72c621aab870d4bfe4594f;p=chaz%2Fopenbox diff --git a/openbox/actions.c b/openbox/actions.c index 463962a2..125084e8 100644 --- a/openbox/actions.c +++ b/openbox/actions.c @@ -383,13 +383,19 @@ static gboolean actions_interactive_begin_act(ObActionsAct *act, guint state) static void actions_interactive_end_act(void) { if (interactive_act) { + ObActionsAct *ia = interactive_act; + + /* set this to NULL first so the i_post() function can't cause this to + get called again (if it decides it wants to cancel any ongoing + interactive action). */ + interactive_act = NULL; + ungrab_keyboard(); - if (interactive_act->i_post) - interactive_act->i_post(interactive_act->options); + if (ia->i_post) + ia->i_post(ia->options); - actions_act_unref(interactive_act); - interactive_act = NULL; + actions_act_unref(ia); } }