1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:47:45 +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:
Tom 2021-02-21 19:49:08 -07:00 committed by Andreas Kling
parent bd318dcdcd
commit 35363a972a
4 changed files with 19 additions and 21 deletions

View file

@ -1178,7 +1178,7 @@ void WindowManager::event(Core::Event& event)
if (MenuManager::the().has_open_menu()) {
MenuManager::the().close_everyone();
} else {
MenuManager::the().open_menu(*MenuManager::the().system_menu());
MenuManager::the().open_menu(*MenuManager::the().system_menu(), true);
}
return;
}