1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:37: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

@ -120,6 +120,7 @@ public:
void close();
void popup(const Gfx::IntPoint&);
void do_popup(const Gfx::IntPoint&, bool);
bool is_menu_ancestor_of(const Menu&) const;
@ -142,7 +143,7 @@ private:
int item_index_at(const Gfx::IntPoint&);
int padding_between_text_and_shortcut() const { return 50; }
void did_activate(MenuItem&);
void update_for_new_hovered_item();
void update_for_new_hovered_item(bool make_input = false);
ClientConnection* m_client { nullptr };
int m_menu_id { 0 };