1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 19:07:36 +00:00

WindowServer: Make Menus the input window when showing them

This solves a problem where windows don't receive a WindowInputLeft
event when popup menus are opened. This prevented ComboBox being
closed when right clicking the application on the task bar.
This commit is contained in:
Tom 2020-07-15 10:13:13 -06:00 committed by Andreas Kling
parent 59596ff816
commit 8286e72187
8 changed files with 125 additions and 62 deletions

View file

@ -56,6 +56,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&);
@ -104,6 +105,7 @@ private:
RefPtr<Window> m_window;
WeakPtr<Menu> m_current_menu;
WeakPtr<Window> m_previous_input_window;
Vector<WeakPtr<Menu>> m_open_menu_stack;
RefPtr<Core::Timer> m_search_timer;