WindowServer: Reevaluate hover state when switching highlight windows

This makes the mouse cursor update nicely when another window is brought
directly under it by using the window switcher. :^)
This commit is contained in:
Andreas Kling 2021-11-04 14:33:30 +01:00
commit 6c64721955
Notes: sideshowbarker 2024-07-18 01:30:26 +09:00

View file

@ -1662,10 +1662,12 @@ void WindowManager::set_highlight_window(Window* new_highlight_window)
m_highlight_window = new_highlight_window->make_weak_ptr<Window>();
if (previous_highlight_window) {
reevaluate_hover_state_for_window(previous_highlight_window);
previous_highlight_window->invalidate(true, true);
Compositor::the().invalidate_screen(previous_highlight_window->frame().render_rect());
}
if (new_highlight_window) {
reevaluate_hover_state_for_window(new_highlight_window);
new_highlight_window->invalidate(true, true);
Compositor::the().invalidate_screen(new_highlight_window->frame().render_rect());
}