diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-04-14 02:16:49 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-04-14 02:16:49 +0200 |
commit | d5dec1922bd977e92cc86e6e7c0d103ee8a3862d (patch) | |
tree | c1d050d1f9451609a16c8c93f5cca8729101b2e5 /Servers/WindowServer/WSMenuBar.h | |
parent | 2dbece54f56118e0084b7ba77822376b26c3f589 (diff) | |
download | serenity-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.h | 6 |
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) |