From 51860ad468fdf797b1447521c0c7b174fb9596ac Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 4 Aug 2011 13:43:34 -0400 Subject: [PATCH] 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. --- openbox/action.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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; -- 2.34.1