diff options
author | Tom <tomut@yahoo.com> | 2021-03-02 21:13:42 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-03 08:20:11 +0100 |
commit | c73dfe5bf6882967a6cd231906e182edf5837d66 (patch) | |
tree | f83fd6a5502900d028aa2bfe9be9f91e6e0972bb /Userland | |
parent | 87c1b1a25de797244241a4bb2a6634c48918cf40 (diff) | |
download | serenity-c73dfe5bf6882967a6cd231906e182edf5837d66.zip |
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
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Services/WindowServer/WindowManager.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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 |