1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 21:35:07 +00:00

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.
This commit is contained in:
angel 2020-04-21 13:48:38 +02:00 committed by Andreas Kling
parent 52a250cb61
commit 5250f4fb90

View file

@ -120,15 +120,6 @@ void MenuManager::refresh()
void MenuManager::event(Core::Event& event) 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()) { if (static_cast<Event&>(event).is_mouse_event()) {
handle_mouse_event(static_cast<MouseEvent&>(event)); handle_mouse_event(static_cast<MouseEvent&>(event));
return; return;