| Index: ui/aura/mus/window_tree_client.cc
|
| diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc
|
| index 13660c96943379fbde45e8063fb00f656942a44e..78890be25da267c2e3e0cd9ddf4606e02dbfe49b 100644
|
| --- a/ui/aura/mus/window_tree_client.cc
|
| +++ b/ui/aura/mus/window_tree_client.cc
|
| @@ -21,6 +21,7 @@
|
| #include "services/ui/public/interfaces/window_manager.mojom.h"
|
| #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom.h"
|
| #include "ui/aura/client/aura_constants.h"
|
| +#include "ui/aura/client/capture_client.h"
|
| #include "ui/aura/client/drag_drop_client.h"
|
| #include "ui/aura/client/transient_window_client.h"
|
| #include "ui/aura/mus/capture_synchronizer.h"
|
| @@ -453,8 +454,7 @@ void WindowTreeClient::WindowTreeConnectionEstablished(
|
| tree_ = window_tree;
|
|
|
| drag_drop_controller_ = base::MakeUnique<DragDropControllerMus>(this, tree_);
|
| - capture_synchronizer_ =
|
| - base::MakeUnique<CaptureSynchronizer>(this, tree_, GetCaptureClient());
|
| + capture_synchronizer_ = base::MakeUnique<CaptureSynchronizer>(this, tree_);
|
| focus_synchronizer_ = base::MakeUnique<FocusSynchronizer>(this, tree_);
|
| }
|
|
|
| @@ -464,9 +464,15 @@ void WindowTreeClient::OnConnectionLost() {
|
|
|
| bool WindowTreeClient::HandleInternalPropertyChanged(WindowMus* window,
|
| const void* key) {
|
| - if (key != client::kModalKey)
|
| + if (key != client::kModalKey && key != client::kRootWindowCaptureClientKey)
|
| return false;
|
|
|
| + if (key == client::kRootWindowCaptureClientKey) {
|
| + capture_synchronizer_->Attach(
|
| + client::GetCaptureClient(window->GetWindow()));
|
| + return true;
|
| + }
|
| +
|
| if (window->GetWindow()->GetProperty(client::kModalKey) ==
|
| ui::MODAL_TYPE_NONE) {
|
| // TODO: shouldn't early return, but explicitly tell server to turn off
|
|
|