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
commit c73dfe5bf6
Notes: sideshowbarker 2024-07-18 21:45:48 +09:00

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