1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 22:47:44 +00:00

WindowServer: Stop exposing open_menu_stack in MenuManager

The open menu stack is an internal data structure that outside classes
shouldn't really need to know about. Add MenuManager::has_open_menu()
so that the WindowManager can still know whether a menu is open or not.
This commit is contained in:
Shannon Booth 2020-02-20 20:06:11 +13:00 committed by Andreas Kling
parent 238b6871e0
commit 088d7be19c
3 changed files with 7 additions and 8 deletions

View file

@ -748,7 +748,7 @@ void WindowManager::process_mouse_event(MouseEvent& event, Window*& hovered_wind
}
// FIXME: Now that the menubar has a dedicated window, is this special-casing really necessary?
if (!MenuManager::the().open_menu_stack().is_empty() || (!active_window_is_modal() && menubar_rect().contains(event.position()))) {
if (MenuManager::the().has_open_menu() || (!active_window_is_modal() && menubar_rect().contains(event.position()))) {
MenuManager::the().dispatch_event(event);
return;
}