| Index: components/mus/ws/window_tree.cc
|
| diff --git a/components/mus/ws/window_tree.cc b/components/mus/ws/window_tree.cc
|
| index 0114bf5e89484c2ea0a5aa308e023c9861395187..31c1e9331dfa91e588bc4cdf55986da7f31a9086 100644
|
| --- a/components/mus/ws/window_tree.cc
|
| +++ b/components/mus/ws/window_tree.cc
|
| @@ -242,8 +242,15 @@ bool WindowTree::AddTransientWindow(const ClientWindowId& window_id,
|
| bool WindowTree::SetModal(const ClientWindowId& window_id) {
|
| ServerWindow* window = GetWindowByClientId(window_id);
|
| if (window && access_policy_->CanSetModal(window)) {
|
| - window->SetModal();
|
| WindowManagerState* wms = GetWindowManagerState(window);
|
| + if (window->transient_parent()) {
|
| + window->SetModal();
|
| + } else if (user_id_ != InvalidUserId()) {
|
| + if (wms)
|
| + wms->AddSystemModalWindow(window);
|
| + } else {
|
| + return false;
|
| + }
|
| if (wms)
|
| wms->ReleaseCaptureBlockedByModalWindow(window);
|
| return true;
|
|
|