From 107744b2c5e617a9832def1455d5342cb7b5e1d1 Mon Sep 17 00:00:00 2001 From: koekeishiya Date: Thu, 22 Sep 2022 17:44:24 +0200 Subject: [PATCH] .. --- src/window_manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/window_manager.c b/src/window_manager.c index d40b7af7..d588a27c 100644 --- a/src/window_manager.c +++ b/src/window_manager.c @@ -1657,9 +1657,9 @@ enum window_op_error window_manager_swap_window(struct space_manager *sm, struct window_manager_add_managed_window(wm, window, a_view); } - if (a_visible && a->id == wm->focused_window_id) { + if (a_visible && !b_visible && a->id == wm->focused_window_id) { window_manager_focus_window_with_raise(&b->application->psn, b->id, b->ref); - } else if (b_visible && b->id == wm->focused_window_id) { + } else if (b_visible && !a_visible && b->id == wm->focused_window_id) { window_manager_focus_window_with_raise(&a->application->psn, a->id, a->ref); } }