summaryrefslogtreecommitdiff
path: root/Servers/WindowServer/WSMenuManager.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-11 12:54:23 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-11 13:13:08 +0100
commit5e61fd0e67f0ae3e77435d1aea2bcba1b37cf320 (patch)
tree901719e9a268c4a608179ec0ae0bcd07466f52da /Servers/WindowServer/WSMenuManager.h
parentcbecad0a776e0b9a7d5e116740fb70f7ebbba813 (diff)
downloadserenity-5e61fd0e67f0ae3e77435d1aea2bcba1b37cf320.zip
WindowManager: Simplify menu bar open/close logic
Let the global menu bar be either "open" or "closed". Clicking on one of the menus in the menu bar toggles the state. This ends up simpler and more intuitive than what we had before.
Diffstat (limited to 'Servers/WindowServer/WSMenuManager.h')
-rw-r--r--Servers/WindowServer/WSMenuManager.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Servers/WindowServer/WSMenuManager.h b/Servers/WindowServer/WSMenuManager.h
index 37079ba956..2ae7e492ae 100644
--- a/Servers/WindowServer/WSMenuManager.h
+++ b/Servers/WindowServer/WSMenuManager.h
@@ -26,6 +26,7 @@ public:
WSMenu* current_menu() { return m_current_menu.ptr(); }
void set_current_menu(WSMenu*, bool is_submenu = false);
+ void close_bar();
void close_everyone();
void close_everyone_not_in_lineage(WSMenu&);
void close_menu_and_descendants(WSMenu&);
@@ -49,5 +50,6 @@ private:
WeakPtr<WSMenu> m_current_menu;
Vector<WeakPtr<WSMenu>> m_open_menu_stack;
- bool m_needs_window_resize;
+ bool m_needs_window_resize { false };
+ bool m_bar_open { false };
};