mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-09 01:20:46 +00:00
WindowServer: Don't block child-windows of modal windows
ComboBox creates a regular (non-modal) window; I believe this is fine. A Dialog (modal window) can contain a ComboBox; I believe this is fine. A non-modal child window of a modal window (e.g. a ComboBox pop-out within a Dialog) wasn't clickable, and was blocked in the WindowManager. I want to change this behavior. This edge case occurs when trying to select a month in the "Calendar" Application.
This commit is contained in:
parent
c1a6841cb2
commit
cc67671d95
|
@ -362,7 +362,14 @@ bool Window::is_active() const
|
|||
|
||||
bool Window::is_blocked_by_modal_window() const
|
||||
{
|
||||
return !is_modal() && client() && client()->is_showing_modal_window();
|
||||
bool is_any_modal = false;
|
||||
const Window* next = this;
|
||||
while (!is_any_modal && next) {
|
||||
is_any_modal = next->is_modal();
|
||||
next = next->parent_window();
|
||||
}
|
||||
|
||||
return !is_any_modal && client() && client()->is_showing_modal_window();
|
||||
}
|
||||
|
||||
void Window::set_default_icon()
|
||||
|
|
Loading…
Reference in a new issue