| Index: ash/display/display_controller.cc
|
| diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
|
| index 4044fe76464973527bd587b74faa68f5f90330be..898268471bc987217358f88454c0da61bb4f246d 100644
|
| --- a/ash/display/display_controller.cc
|
| +++ b/ash/display/display_controller.cc
|
| @@ -17,6 +17,8 @@
|
| #include "ash/host/ash_window_tree_host.h"
|
| #include "ash/host/ash_window_tree_host_init_params.h"
|
| #include "ash/host/root_window_transformer.h"
|
| +#include "ash/magnifier/magnification_controller.h"
|
| +#include "ash/magnifier/partial_magnification_controller.h"
|
| #include "ash/root_window_controller.h"
|
| #include "ash/root_window_settings.h"
|
| #include "ash/screen_util.h"
|
| @@ -367,7 +369,7 @@ aura::Window* DisplayController::GetRootWindowForDisplayId(int64 id) {
|
|
|
| AshWindowTreeHost* DisplayController::GetAshWindowTreeHostForDisplayId(
|
| int64 id) {
|
| - CHECK_EQ(1u, window_tree_hosts_.count(id));
|
| + CHECK_EQ(1u, window_tree_hosts_.count(id)) << "id = " << id;
|
| return window_tree_hosts_[id];
|
| }
|
|
|
| @@ -640,6 +642,14 @@ void DisplayController::OnDisplayAdded(const gfx::Display& display) {
|
| AddWindowTreeHostForDisplay(display, AshWindowTreeHostInitParams());
|
| RootWindowController::CreateForSecondaryDisplay(ash_host);
|
|
|
| + // Magnifier controllers keep pointers to the current root window.
|
| + // Update them here to avoid accessing them later.
|
| + Shell::GetInstance()->magnification_controller()->SwitchTargetRootWindow(
|
| + ash_host->AsWindowTreeHost()->window(), false);
|
| + Shell::GetInstance()
|
| + ->partial_magnification_controller()
|
| + ->SwitchTargetRootWindow(ash_host->AsWindowTreeHost()->window());
|
| +
|
| if (primary_tree_host_for_replace_) {
|
| AshWindowTreeHost* to_delete = primary_tree_host_for_replace_;
|
| primary_tree_host_for_replace_ = nullptr;
|
|
|