1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00

WindowServer: Re-evaluate hover state when active window changes

This effectively makes us send a "mouse move" event to windows when they
become active, even if the mouse didn't actually move. By doing this, we
trigger hover/tooltip/etc logic immediately, instead of doing it on the
next 1px mouse movement.

It's a small detail but my goodness does it feel better this way. :^)
This commit is contained in:
Andreas Kling 2021-10-22 13:20:13 +02:00
parent cf0dbc9069
commit 09b08d8e35

View file

@ -1753,6 +1753,7 @@ void WindowManager::set_active_window(Window* new_active_window, bool make_input
if (new_active_window) {
window_stack.set_active_window(new_active_window);
notify_new_active_window(*new_active_window);
reevaluate_hovered_window(new_active_window);
}
// Window shapes may have changed (e.g. shadows for inactive/active windows)