mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:27:34 +00:00
WindowServer: Simplify how we determine the hovered window
Instead of plumbing a Window* through the entire mouse event processing logic, just do a hit test and say that the window under the cursor is the hovered window. It's funny how much easier this is now that we have a way to hit test the entire window stack with one call.
This commit is contained in:
parent
3bf5e482cf
commit
fa9846ec6f
2 changed files with 25 additions and 50 deletions
|
@ -234,14 +234,14 @@ public:
|
|||
private:
|
||||
NonnullRefPtr<Cursor> get_cursor(String const& name);
|
||||
|
||||
void process_mouse_event(MouseEvent&, Window*& hovered_window);
|
||||
void process_mouse_event(MouseEvent&);
|
||||
void process_event_for_doubleclick(Window& window, MouseEvent& event);
|
||||
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);
|
||||
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&, Window*& hovered_window);
|
||||
void process_mouse_event_for_window(HitTestResult&, MouseEvent&);
|
||||
|
||||
template<typename Callback>
|
||||
void for_each_window_manager(Callback);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue