mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02: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:
Notes:
sideshowbarker
2024-07-18 01:13:52 +09:00
Author: https://github.com/tomuta Commit: https://github.com/SerenityOS/serenity/commit/32d59257d65 Pull-request: https://github.com/SerenityOS/serenity/pull/10885 Issue: https://github.com/SerenityOS/serenity/issues/10836
@@ -298,6 +298,8 @@ void MenuManager::open_menu(Menu& menu, bool as_current_menu)
|
||||
|
||||
m_open_menu_stack.append(menu);
|
||||
|
||||
menu.set_visible(true);
|
||||
|
||||
if (!menu.is_empty()) {
|
||||
menu.redraw_if_theme_changed();
|
||||
auto* window = menu.menu_window();
|
||||
|
||||
Reference in New Issue
Block a user