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:
Ben Wiederhake 2020-05-04 03:53:52 +02:00 committed by Andreas Kling
parent c1a6841cb2
commit cc67671d95

View file

@ -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()