From c4438d6fd4aa8930b7b504921bd8d1f4ca3e1faf Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 17 Feb 2021 16:52:08 +0100 Subject: [PATCH] WindowServer: Unbreak "pick new active window" algorithm We lost the ability to pick a suitable new active window when I added the support for tool windows. --- Userland/Services/WindowServer/WindowManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp index 2551ebfcfb..1d44f1dade 100644 --- a/Userland/Services/WindowServer/WindowManager.cpp +++ b/Userland/Services/WindowServer/WindowManager.cpp @@ -418,7 +418,7 @@ bool WindowManager::pick_new_active_window(Window* previous_active) bool new_window_picked = false; Window* first_candidate = nullptr; for_each_visible_window_from_front_to_back([&](Window& candidate) { - if (candidate.type() != WindowType::Normal && candidate.type() == WindowType::ToolWindow) + if (candidate.type() != WindowType::Normal && candidate.type() != WindowType::ToolWindow) return IterationDecision::Continue; if (candidate.is_destroyed()) return IterationDecision::Continue;