| Index: services/ui/ws/window_tree.cc
|
| diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc
|
| index 4abe468092909ef7d03cdc6413366c6de8f17981..e424cf317f94becfbcf48d41513cabe789e1dcec 100644
|
| --- a/services/ui/ws/window_tree.cc
|
| +++ b/services/ui/ws/window_tree.cc
|
| @@ -1585,6 +1585,26 @@ void WindowTree::SetPredefinedCursor(uint32_t change_id,
|
| client()->OnChangeCompleted(change_id, success);
|
| }
|
|
|
| +void WindowTree::DeactivateWindow(Id window_id) {
|
| + ServerWindow* window =
|
| + GetWindowByClientId(ClientWindowId(window_id));
|
| + if (!window) {
|
| + DVLOG(1) << "DeactivateWindow failed (invalid id)";
|
| + return;
|
| + }
|
| +
|
| + WindowManagerDisplayRoot* display_root = GetWindowManagerDisplayRoot(window);
|
| + if (!display_root) {
|
| + // The window isn't parented. There's nothing to do.
|
| + DVLOG(1) << "DeactivateWindow failed (window unparented)";
|
| + return;
|
| + }
|
| +
|
| + WindowTree* wm_tree = display_root->window_manager_state()->window_tree();
|
| + wm_tree->window_manager_internal_->WmDeactivateWindow(
|
| + wm_tree->ClientWindowIdForWindow(window).id);
|
| +}
|
| +
|
| void WindowTree::GetWindowManagerClient(
|
| mojo::AssociatedInterfaceRequest<mojom::WindowManagerClient> internal) {
|
| if (!access_policy_->CanSetWindowManager() || !window_manager_internal_ ||
|
|
|