From: Dana Jansens Date: Thu, 4 Aug 2011 17:43:34 +0000 (-0400) Subject: Fix interactive actions with the new action running code. X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=51860ad468fdf797b1447521c0c7b174fb9596ac;p=dana%2Fopenbox.git Fix interactive actions with the new action running code. It was running the interactive action init code when running an interactive action that is already running. --- diff --git a/openbox/action.c b/openbox/action.c index e134a652..cbf150a0 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -288,14 +288,16 @@ gboolean action_run(ObAction *act, const ObActionListRun *data, run_i = FALSE; if (action_is_interactive(act)) { ObActionRunFunc this_run = act->def->run; - ObActionRunFunc i_run = (current_i_act ? - current_i_act->def->run : NULL); - - if (i_run && i_run != this_run) - action_interactive_cancel_act(); - run_i = TRUE; - if (i_run != this_run && act->i_pre) - run_i = act->i_pre(data->mod_state, act->options); + ObActionRunFunc current_i_run = (current_i_act ? + current_i_act->def->run : NULL); + + if (current_i_run != this_run) { + if (current_i_run) + action_interactive_cancel_act(); + run_i = TRUE; + if (act->i_pre) + run_i = act->i_pre(data->mod_state, act->options); + } } run = TRUE;