summaryrefslogtreecommitdiff
path: root/Servers/WindowServer
diff options
context:
space:
mode:
authorangel <angel@ttm.sh>2020-04-21 13:48:38 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-21 16:27:36 +0200
commit5250f4fb90dd5df0eac28dd992a9c6e1b3da8865 (patch)
tree81f2b98a95c8bb70c75492358be131ce9a686f4f /Servers/WindowServer
parent52a250cb614805134ef7e253a1866d69bcb99b9f (diff)
downloadserenity-5250f4fb90dd5df0eac28dd992a9c6e1b3da8865.zip
WindowServer: Don't ignore modal events when showing menus
PR #1495 fixes #1464 but only accounts for window menus. In File Manager, for example, attempting to pop up the context menu on the file name text box of the properties modal window, will result in the same behavior. Removing the code altogether solves the problem, altough I'm not sure if it could have any bad implications. I was thinking it might allow interaction with a parent window menu if it remains open just before the popup window is shown, but I have not seen a way to replicate this behavior.
Diffstat (limited to 'Servers/WindowServer')
-rw-r--r--Servers/WindowServer/MenuManager.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/Servers/WindowServer/MenuManager.cpp b/Servers/WindowServer/MenuManager.cpp
index 995f9455fb..6043ee6aa6 100644
--- a/Servers/WindowServer/MenuManager.cpp
+++ b/Servers/WindowServer/MenuManager.cpp
@@ -120,15 +120,6 @@ void MenuManager::refresh()
void MenuManager::event(Core::Event& event)
{
- auto* active_window = WindowManager::the().active_window();
- if (active_window && active_window->is_modal() && has_open_menu()) {
- auto* topmost_menu = m_open_menu_stack.last().ptr();
- ASSERT(topmost_menu);
- // Always allow window menu interaction, even while a modal window is active.
- if (!topmost_menu->window_menu_of())
- return Core::Object::event(event);
- }
-
if (static_cast<Event&>(event).is_mouse_event()) {
handle_mouse_event(static_cast<MouseEvent&>(event));
return;