if (run) {
gboolean end;
+ const gboolean acted_on_focus = client_set_contains(set, focus_client);
+
+ if (!action_is_interactive(act) && acted_on_focus)
+ event_update_user_time();
end = !act->def->run(set, data, act->options);
g_assert(end || action_is_interactive(act));
- if (end) {
- if (action_is_interactive(act))
- action_interactive_end_act();
- else if (client_set_contains(set, focus_client))
+ if (action_is_interactive(act) && end) {
+ if (acted_on_focus)
event_update_user_time();
+
+ action_interactive_end_act();
}
}
if (data->user_act != OB_USER_ACTION_MENU_SELECTION)
event_cancel_all_key_grabs();
+ /* Negate any recent interaction with windows as we are executing
+ something, and want it to be focused if the user doesn't continue
+ interacting with a window. */
+ event_reset_user_time();
+
e = NULL;
if (!g_shell_parse_argv(cmd, NULL, &argv, &e)) {
g_message("%s", e->message);