1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

WindowServer: Ensure menu visibility after pushing menu to the stack

We need to make sure the menu was pushed to the open menu stack before
calling set_visible, as this may trigger cursor re-evaluation, which
in turn expects the menu to be considered open.

Fixes #10836
This commit is contained in:
Tom 2021-11-12 14:16:53 -07:00 committed by Andreas Kling
parent 81786f6abe
commit 32d59257d6
2 changed files with 2 additions and 1 deletions

View file

@ -638,7 +638,6 @@ void Menu::do_popup(const Gfx::IntPoint& position, bool make_input, bool as_subm
}
window.move_to(adjusted_pos);
set_visible(true);
MenuManager::the().open_menu(*this, make_input);
WindowManager::the().did_popup_a_menu({});
}