1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:27:35 +00:00

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
This commit is contained in:
Tom 2021-03-02 21:13:42 -07:00 committed by Andreas Kling
parent 87c1b1a25d
commit c73dfe5bf6

View file

@ -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