mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00: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
1 changed files with 6 additions and 2 deletions
|
@ -330,8 +330,12 @@ void Window::event(Core::Event& event)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_blocked_by_modal_window())
|
if (is_blocked_by_modal_window()) {
|
||||||
return;
|
// 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())
|
if (static_cast<Event&>(event).is_mouse_event())
|
||||||
return handle_mouse_event(static_cast<const MouseEvent&>(event));
|
return handle_mouse_event(static_cast<const MouseEvent&>(event));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue