mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 17:24:48 -05:00
WindowServer: Send WindowDeactivated event to windows blocked by modal
When a new modal window is created, we still want to forward the WindowDeactivated event to its parent window, despite it being blocked by the newly created modal (which causes WindowServer's Window::event() to ignore all incoming events from WindowManager for that window). This fixes the "terminal doesn't stop blinking when blocked by modal window" bug.
This commit is contained in:
parent
e27d281bf1
commit
c0356fc183
Notes:
sideshowbarker
2024-07-19 00:18:46 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/c0356fc1839 Pull-request: https://github.com/SerenityOS/serenity/pull/4691
1 changed files with 6 additions and 2 deletions
|
@ -330,8 +330,12 @@ void Window::event(Core::Event& event)
|
|||
return;
|
||||
}
|
||||
|
||||
if (is_blocked_by_modal_window())
|
||||
return;
|
||||
if (is_blocked_by_modal_window()) {
|
||||
// We still want to handle the WindowDeactivated event below when a new modal is
|
||||
// created to notify its parent window, despite it being "blocked by modal window".
|
||||
if (event.type() != Event::WindowDeactivated)
|
||||
return;
|
||||
}
|
||||
|
||||
if (static_cast<Event&>(event).is_mouse_event())
|
||||
return handle_mouse_event(static_cast<const MouseEvent&>(event));
|
||||
|
|
Loading…
Reference in a new issue