summaryrefslogtreecommitdiff
path: root/Servers/WindowServer/WSMenuBar.h
diff options
context:
space:
mode:
Diffstat (limited to 'Servers/WindowServer/WSMenuBar.h')
-rw-r--r--Servers/WindowServer/WSMenuBar.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Servers/WindowServer/WSMenuBar.h b/Servers/WindowServer/WSMenuBar.h
index 7854795ed5..08fc527e59 100644
--- a/Servers/WindowServer/WSMenuBar.h
+++ b/Servers/WindowServer/WSMenuBar.h
@@ -13,7 +13,11 @@ public:
WSClientConnection& client() { return m_client; }
const WSClientConnection& client() const { return m_client; }
int menubar_id() const { return m_menubar_id; }
- void add_menu(WSMenu* menu) { m_menus.append(menu); }
+ void add_menu(WSMenu& menu)
+ {
+ menu.set_menubar(this);
+ m_menus.append(&menu);
+ }
template<typename Callback>
void for_each_menu(Callback callback)