From 50fa7598065757d65ad6c36395d269b51b4e80c2 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 8 Jan 2020 13:13:08 +0100 Subject: [PATCH] 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. --- Servers/WindowServer/WSWindowManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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);