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

WindowServer: Make various functions take MouseEvent by const reference

Some paths of the mouse event processing code will upgrade the event
from a regular MouseDown to a MouseDoubleClick. That's why we were
passing `MouseEvent&` everywhere.

For the paths that don't need to do this, passing `MouseEvent const&`
reduces the cognitive burden a bit, so let's do that.
This commit is contained in:
Andreas Kling 2021-06-18 17:43:36 +02:00
parent 82f1ac7390
commit 4895f46d8c
2 changed files with 8 additions and 8 deletions

View file

@ -182,7 +182,7 @@ public:
void invalidate_after_theme_or_font_change();
bool set_hovered_window(Window*);
void deliver_mouse_event(Window&, MouseEvent&, bool process_double_click);
void deliver_mouse_event(Window&, MouseEvent const&, bool process_double_click);
void did_popup_a_menu(Badge<Menu>);
@ -239,9 +239,9 @@ private:
bool process_ongoing_window_resize(MouseEvent const&);
bool process_ongoing_window_move(MouseEvent&);
bool process_ongoing_drag(MouseEvent&);
bool process_ongoing_active_input_mouse_event(MouseEvent&);
bool process_mouse_event_for_titlebar_buttons(MouseEvent&);
void process_mouse_event_for_window(HitTestResult&, MouseEvent&);
bool process_ongoing_active_input_mouse_event(MouseEvent const&);
bool process_mouse_event_for_titlebar_buttons(MouseEvent const&);
void process_mouse_event_for_window(HitTestResult&, MouseEvent const&);
template<typename Callback>
void for_each_window_manager(Callback);