From c73dfe5bf6882967a6cd231906e182edf5837d66 Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 2 Mar 2021 21:13:42 -0700 Subject: WindowServer: Mark screen dirty when changing highlighted window Because the z-order changes we not only need to recompute occlusions but we also need to mark the screen area of the previous and new highlighted window as dirty. Fixes #5599 --- Userland/Services/WindowServer/WindowManager.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Userland/Services') diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp index a4a84fe82c..77770915d0 100644 --- a/Userland/Services/WindowServer/WindowManager.cpp +++ b/Userland/Services/WindowServer/WindowManager.cpp @@ -1252,10 +1252,16 @@ void WindowManager::set_highlight_window(Window* window) return; auto* previous_highlight_window = m_highlight_window.ptr(); m_highlight_window = window; - if (previous_highlight_window) + if (previous_highlight_window) { previous_highlight_window->invalidate(true, true); - if (m_highlight_window) + Compositor::the().invalidate_screen(previous_highlight_window->frame().render_rect()); + } + if (m_highlight_window) { m_highlight_window->invalidate(true, true); + Compositor::the().invalidate_screen(m_highlight_window->frame().render_rect()); + } + // Invalidate occlusions in case the state change changes geometry + Compositor::the().invalidate_occlusions(); } bool WindowManager::is_active_window_or_accessory(Window& window) const -- cgit v1.2.3