1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

WindowServer: Move some menu related code into MenuManager

Shuffle around some menu related code from window manager into menu
manager. This still is not perfect, and results in a little more of the
window manager to be publically exposed - but this is another step
towards better seperation of concerns between menu and window manager.

We also move the mouse_event handling into a new function in menu manager
as event handling was beginning to become a bit chunky.
This commit is contained in:
Shannon Booth 2020-02-12 19:22:52 +13:00 committed by Andreas Kling
parent 24dfc5051a
commit 91a97f7a42
4 changed files with 74 additions and 64 deletions

View file

@ -44,8 +44,6 @@ public:
void refresh();
virtual void event(Core::Event&) override;
bool is_open(const Menu&) const;
Vector<WeakPtr<Menu>>& open_menu_stack() { return m_open_menu_stack; }
@ -95,6 +93,8 @@ private:
const Window& window() const { return *m_window; }
virtual void event(Core::Event&) override;
void handle_mouse_event(MouseEvent&);
void handle_menu_mouse_event(Menu&, const MouseEvent&);
void draw();