mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:57:44 +00:00
WindowServer: Reset menu position when opened by the menu bar
Also, only mark the menu bar item as opened if a menu was actually opened through the menu bar. These changes allow a menu to be used both in the menu bar as well as a context menu. Fixes #5469
This commit is contained in:
parent
bd318dcdcd
commit
35363a972a
4 changed files with 19 additions and 21 deletions
|
@ -57,8 +57,7 @@ public:
|
|||
Menu* current_menu() { return m_current_menu.ptr(); }
|
||||
void set_current_menu(Menu*);
|
||||
void clear_current_menu();
|
||||
void open_menu(Menu&, bool as_current_menu = true);
|
||||
void toggle_menu(Menu&);
|
||||
void open_menu(Menu&, bool from_menu_bar, bool as_current_menu = true);
|
||||
|
||||
MenuBar* current_menubar() { return m_current_menubar.ptr(); }
|
||||
void set_current_menubar(MenuBar*);
|
||||
|
@ -108,6 +107,7 @@ private:
|
|||
RefPtr<Window> m_window;
|
||||
|
||||
WeakPtr<Menu> m_current_menu;
|
||||
WeakPtr<Menu> m_current_menu_bar_menu;
|
||||
WeakPtr<Window> m_previous_input_window;
|
||||
Vector<WeakPtr<Menu>> m_open_menu_stack;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue