summaryrefslogtreecommitdiff
path: root/Servers
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2020-01-08 13:13:08 +0100
committerAndreas Kling <awesomekling@gmail.com>2020-01-08 13:13:36 +0100
commit50fa7598065757d65ad6c36395d269b51b4e80c2 (patch)
treed863c66faf665b25d36ea5517780088a42ae1b5e /Servers
parentfe1bf067b8045ae3410625b235e06ffcabe24b0e (diff)
downloadserenity-50fa7598065757d65ad6c36395d269b51b4e80c2.zip
Revert "WSWindowServer: Remove uneccessary special casing"
This reverts commit 0c1bc91e8832bca4fe6563ba77f9986be6164841. It turns out this is what made it possible to hover "between" different menus after opening one of them with a click.
Diffstat (limited to 'Servers')
-rw-r--r--Servers/WindowServer/WSWindowManager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Servers/WindowServer/WSWindowManager.cpp b/Servers/WindowServer/WSWindowManager.cpp
index c913bd3e45..b49e217865 100644
--- a/Servers/WindowServer/WSWindowManager.cpp
+++ b/Servers/WindowServer/WSWindowManager.cpp
@@ -708,6 +708,12 @@ void WSWindowManager::process_mouse_event(WSMouseEvent& event, WSWindow*& hovere
deliver_mouse_event(*window, translated_event);
}
+ // FIXME: Now that the menubar has a dedicated window, is this special-casing really necessary?
+ if (!active_window_is_modal() && menubar_rect().contains(event.position())) {
+ m_menu_manager.dispatch_event(event);
+ return;
+ }
+
if (!menu_manager().open_menu_stack().is_empty()) {
auto* topmost_menu = menu_manager().open_menu_stack().last().ptr();
ASSERT(topmost_menu);