summaryrefslogtreecommitdiff
path: root/Servers/WindowServer/WSMenuBar.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-14 02:16:49 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-14 02:16:49 +0200
commitd5dec1922bd977e92cc86e6e7c0d103ee8a3862d (patch)
treec1d050d1f9451609a16c8c93f5cca8729101b2e5 /Servers/WindowServer/WSMenuBar.h
parent2dbece54f56118e0084b7ba77822376b26c3f589 (diff)
downloadserenity-d5dec1922bd977e92cc86e6e7c0d103ee8a3862d.zip
WindowServer: Make menu windows inherently modal.
It was confusing that you could interact with other windows with a menu up.
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)