Browse Source

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. :^)
Andreas Kling 3 years ago
parent
commit
09b08d8e35
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Userland/Services/WindowServer/WindowManager.cpp

+ 1 - 0
Userland/Services/WindowServer/WindowManager.cpp

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