diff --git a/src/fe-common/core/window-commands.c b/src/fe-common/core/window-commands.c index e877b906..26ec2286 100644 --- a/src/fe-common/core/window-commands.c +++ b/src/fe-common/core/window-commands.c @@ -738,7 +738,8 @@ static void cmd_foreach_window(const char *data) list = g_slist_remove(list, list->data); } - active_win = old; + if (g_slist_find(windows, old) != NULL) + active_win = old; } void window_commands_init(void)