mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
WindowServer: Don't ignore mouse events after showing modal window (#1495)
Fixes #1464
This commit is contained in:
parent
30649ed93f
commit
fefc2665d6
Notes:
sideshowbarker
2024-07-19 08:07:54 +09:00
Author: https://github.com/muscar Commit: https://github.com/SerenityOS/serenity/commit/fefc2665d6d Pull-request: https://github.com/SerenityOS/serenity/pull/1495 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/shannonbooth
1 changed files with 8 additions and 2 deletions
|
@ -120,8 +120,14 @@ void MenuManager::refresh()
|
|||
|
||||
void MenuManager::event(Core::Event& event)
|
||||
{
|
||||
if (WindowManager::the().active_window_is_modal())
|
||||
return Core::Object::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));
|
||||
|
|
Loading…
Reference in a new issue