summaryrefslogtreecommitdiff
path: root/Servers
diff options
context:
space:
mode:
authorangel <angel@ttm.sh>2020-04-21 16:46:32 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-21 16:54:34 +0200
commit1032ae014053ccf5482b78465f02554165212ba9 (patch)
tree62727473857a99f60a8c91ff1f6986e6681522c9 /Servers
parentb9be57a9cda4b83523f14d2998cce210cbf84d77 (diff)
downloadserenity-1032ae014053ccf5482b78465f02554165212ba9.zip
WindowServer: Allow the system menu to be open when a modal is shown
Diffstat (limited to 'Servers')
-rw-r--r--Servers/WindowServer/MenuManager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Servers/WindowServer/MenuManager.cpp b/Servers/WindowServer/MenuManager.cpp
index a0a1261770..2470d4f1fa 100644
--- a/Servers/WindowServer/MenuManager.cpp
+++ b/Servers/WindowServer/MenuManager.cpp
@@ -151,8 +151,9 @@ void MenuManager::handle_mouse_event(MouseEvent& mouse_event)
bool handled_menubar_event = false;
for_each_active_menubar_menu([&](Menu& menu) {
if (menu.rect_in_menubar().contains(mouse_event.position())) {
- handle_menu_mouse_event(menu, mouse_event);
- handled_menubar_event = !active_window || !active_window->is_modal();
+ handled_menubar_event = &menu == m_system_menu || !active_window || !active_window->is_modal();
+ if (handled_menubar_event)
+ handle_menu_mouse_event(menu, mouse_event);
return IterationDecision::Break;
}
return IterationDecision::Continue;