1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 07:38:10 +00:00

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
parent dd8a459a1f
commit 6c64721955

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());
}