mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
WindowServer: Send events once when global cursor tracking is enabled
Previously we'd send mouse events twice if the target window had global cursor tracking enabled.
This commit is contained in:
parent
20b2c46019
commit
f1ac0b6a5a
Notes:
sideshowbarker
2024-07-18 11:55:13 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/f1ac0b6a5ae Pull-request: https://github.com/SerenityOS/serenity/pull/8199
@ -1007,8 +1007,10 @@ void WindowManager::process_mouse_event(MouseEvent& event)
|
||||
return;
|
||||
|
||||
// 2. Send the mouse event to all windows with global cursor tracking enabled.
|
||||
// The active input tracking window is excluded here because we're sending the event to it
|
||||
// in the next step.
|
||||
m_window_stack.for_each_visible_window_from_front_to_back([&](Window& window) {
|
||||
if (window.global_cursor_tracking())
|
||||
if (window.global_cursor_tracking() && &window != m_active_input_tracking_window)
|
||||
deliver_mouse_event(window, event, false);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user