Chromium Code Reviews| Index: services/ui/ws/window_tree.cc |
| diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc |
| index 8602975133cad3c06da70455c4e44c282aa2d9d3..9875dd7a638d00de31d97e8ceb57554f36feacb2 100644 |
| --- a/services/ui/ws/window_tree.cc |
| +++ b/services/ui/ws/window_tree.cc |
| @@ -352,9 +352,7 @@ bool WindowTree::DeleteWindow(const ClientWindowId& window_id) { |
| return tree && tree->DeleteWindowImpl(this, window); |
| } |
| -bool WindowTree::SetModalType(const ClientWindowId& window_id, |
| - ModalType modal_type) { |
| - ServerWindow* window = GetWindowByClientId(window_id); |
| +bool WindowTree::SetModalType(ServerWindow* window, ModalType modal_type) { |
| if (!window || !access_policy_->CanSetModal(window)) |
| return false; |
| @@ -1295,8 +1293,17 @@ void WindowTree::RemoveTransientWindowFromParent(uint32_t change_id, |
| void WindowTree::SetModalType(uint32_t change_id, |
| Id window_id, |
| ModalType modal_type) { |
| - client()->OnChangeCompleted( |
| - change_id, SetModalType(ClientWindowId(window_id), modal_type)); |
| + ServerWindow* window = GetWindowByClientId(ClientWindowId(window_id)); |
| + if (window && ShouldRouteToWindowManager(window)) { |
| + WindowTree* wm_tree = GetWindowManagerDisplayRoot(window) |
|
sky
2017/03/14 21:16:22
As ash always allows the change I suggest you forw
Hadi
2017/03/17 16:16:32
Done. I also moved the forwarding part to the othe
|
| + ->window_manager_state() |
| + ->window_tree(); |
| + wm_tree->window_manager_internal_->WmSetModalType( |
| + window_server_->GenerateWindowManagerChangeId(this, change_id), |
|
sky
2017/03/14 21:16:23
If you generate a change id like this the expectat
Hadi
2017/03/17 16:16:32
Done.
|
| + wm_tree->ClientWindowIdForWindow(window).id, modal_type); |
| + return; |
| + } |
| + client()->OnChangeCompleted(change_id, SetModalType(window, modal_type)); |
| } |
| void WindowTree::ReorderWindow(uint32_t change_id, |