1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:47:35 +00:00

WindowServer: More work on the menu system.

Menus are now tied to a Process (by WeakPtr.) This will allow us to pass
notifications to the correct event stream.
This commit is contained in:
Andreas Kling 2019-02-12 08:39:19 +01:00
parent 133706d697
commit 15b4c9f9f1
7 changed files with 43 additions and 39 deletions

View file

@ -52,6 +52,7 @@ public:
const Font& font() const { return *m_font; }
void close_menu(WSMenu&);
Color menu_selection_color() const { return m_menu_selection_color; }
int api$menubar_create();
int api$menubar_destroy(int menubar_id);
@ -141,6 +142,8 @@ private:
int m_next_menubar_id = 100;
int m_next_menu_id = 900;
OwnPtr<WSMenu> m_system_menu;
Color m_menu_selection_color;
WSMenuBar* m_current_menubar { nullptr };
WSMenu* m_current_menu { nullptr };
HashMap<int, OwnPtr<WSMenuBar>> m_menubars;