summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Servers/WindowServer/Window.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Servers/WindowServer/Window.cpp b/Servers/WindowServer/Window.cpp
index 4f24dfb7af..4d506e1dc7 100644
--- a/Servers/WindowServer/Window.cpp
+++ b/Servers/WindowServer/Window.cpp
@@ -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()