From 7345b502abdb769b7c7f63be9b9c883fc18f5929 Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 27 Apr 2021 21:21:36 -0600 Subject: [PATCH] WindowServer: Don't restore active window if it is minimized When closing a menu, don't restore the active input to a window that is now minimized or invisible. Fixes #6690 --- Userland/Services/WindowServer/WindowManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp index 31ecedc6981..ae2768ad7f6 100644 --- a/Userland/Services/WindowServer/WindowManager.cpp +++ b/Userland/Services/WindowServer/WindowManager.cpp @@ -1322,7 +1322,10 @@ void WindowManager::restore_active_input_window(Window* window) if (!window && pick_new_active_window(nullptr)) return; - set_active_input_window(window); + if (window && !window->is_minimized() && window->is_visible()) + set_active_input_window(window); + else + set_active_input_window(nullptr); } Window* WindowManager::set_active_input_window(Window* window)