diff options
author | Andreas Kling <kling@serenityos.org> | 2021-03-25 21:01:19 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-25 22:14:09 +0100 |
commit | e76771bfad3afbe3c32b8aff12304fa6f45a3452 (patch) | |
tree | 44c9a11dfccc0ace18be3c85fae998c764c7ea49 /Userland/Services/WindowServer/WindowManager.h | |
parent | 1daaa4f38d74572133f6bec1c66d2a7e806939a5 (diff) | |
download | serenity-e76771bfad3afbe3c32b8aff12304fa6f45a3452.zip |
WindowServer+LibGfx: Show menus in windows! :^)
This patch begins the transition away from the global menu towards
per-window menus instead.
The global menu looks neat, but has always felt clunky, and there
are a number of usability problems with it, especially in programs
with multiple windows.
You can now call GUI::Window::set_menubar() to add a menubar to
your window. It will be specific to that one window only.
Diffstat (limited to 'Userland/Services/WindowServer/WindowManager.h')
-rw-r--r-- | Userland/Services/WindowServer/WindowManager.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Services/WindowServer/WindowManager.h b/Userland/Services/WindowServer/WindowManager.h index 2056c8714c..96e5b63a4f 100644 --- a/Userland/Services/WindowServer/WindowManager.h +++ b/Userland/Services/WindowServer/WindowManager.h @@ -113,6 +113,10 @@ public: const Window* active_input_window() const { return m_active_input_window.ptr(); } const ClientConnection* active_client() const; + Window* window_with_active_menu() { return m_window_with_active_menu; } + const Window* window_with_active_menu() const { return m_window_with_active_menu; } + void set_window_with_active_menu(Window*); + const Window* highlight_window() const { return m_highlight_window.ptr(); } void set_highlight_window(Window*); @@ -329,6 +333,7 @@ private: WeakPtr<Window> m_highlight_window; WeakPtr<Window> m_active_input_window; WeakPtr<Window> m_active_input_tracking_window; + WeakPtr<Window> m_window_with_active_menu; WeakPtr<Window> m_move_window; Gfx::IntPoint m_move_origin; |