1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 09:28:13 +00:00

WindowServer: Always send mouse events to active input tracker first

If a window is currently actively tracking input events (because
sent it a MouseDown and haven't sent it a MouseUp yet), we now simply
send mouse events to that window right away before doing any other
event processing.

This makes it much easier to reason about mouse events.
This commit is contained in:
Andreas Kling 2021-06-18 12:39:20 +02:00
parent 69dad3b996
commit 82a945fa7e
2 changed files with 85 additions and 80 deletions

View file

@ -239,6 +239,7 @@ private:
bool process_ongoing_window_resize(MouseEvent const&, Window*& hovered_window);
bool process_ongoing_window_move(MouseEvent&, Window*& hovered_window);
bool process_ongoing_drag(MouseEvent&, Window*& hovered_window);
bool process_ongoing_active_input_mouse_event(MouseEvent&, Window*& hovered_window);
template<typename Callback>
void for_each_window_manager(Callback);