| Index: services/ui/ws/modal_window_controller.cc
|
| diff --git a/services/ui/ws/modal_window_controller.cc b/services/ui/ws/modal_window_controller.cc
|
| index bb1c0bf135a439d22aecf86635158699c44e69a7..1a49731950d9ff38c331d187f168b035321ec840 100644
|
| --- a/services/ui/ws/modal_window_controller.cc
|
| +++ b/services/ui/ws/modal_window_controller.cc
|
| @@ -78,7 +78,7 @@ bool ModalWindowController::IsWindowBlockedBy(
|
|
|
| bool ModalWindowController::IsWindowBlocked(const ServerWindow* window) const {
|
| DCHECK(window);
|
| - return GetActiveSystemModalWindow() || GetModalChildForWindowAncestor(window);
|
| + return GetTargetForWindow(window) != window;
|
| }
|
|
|
| const ServerWindow* ModalWindowController::GetTargetForWindow(
|
| @@ -87,7 +87,8 @@ const ServerWindow* ModalWindowController::GetTargetForWindow(
|
| // children of their transient parent.
|
| ServerWindow* system_modal_window = GetActiveSystemModalWindow();
|
| if (system_modal_window)
|
| - return system_modal_window;
|
| + return system_modal_window->Contains(window) ? window : system_modal_window;
|
| +
|
| return window ? GetWindowModalTargetForWindow(window) : nullptr;
|
| }
|
|
|
|
|