1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 20:07:34 +00:00

WindowServer: Simplify processing of window-specific mouse events

Move the logic for processing a mouse event that hits a specific window
into its own function.

If the window is blocked by a modal child, we now get that out of the
way first, so we don't have to think about it later.
This commit is contained in:
Andreas Kling 2021-06-18 15:35:46 +02:00
parent 2f9e8a982c
commit 7b3fdd178e
2 changed files with 67 additions and 68 deletions

View file

@ -241,6 +241,7 @@ private:
bool process_ongoing_drag(MouseEvent&, Window*& hovered_window);
bool process_ongoing_active_input_mouse_event(MouseEvent&, Window*& hovered_window);
bool process_mouse_event_for_titlebar_buttons(MouseEvent&);
void process_mouse_event_for_window(HitTestResult&, MouseEvent&, Window*& hovered_window);
template<typename Callback>
void for_each_window_manager(Callback);