Chromium Code Reviews| Index: ash/root_window_controller.cc |
| diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc |
| index d4e9d54f46839f0cdd8618e43dbd7a68b361a19d..fe3e3e98a699c53db23fe56ce12c5a62ea7995b5 100644 |
| --- a/ash/root_window_controller.cc |
| +++ b/ash/root_window_controller.cc |
| @@ -1056,7 +1056,21 @@ void RootWindowController::OnTouchHudProjectionToggled(bool enabled) { |
| RootWindowController* GetRootWindowController( |
| const aura::Window* root_window) { |
| - return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
| + if (!root_window) |
| + return nullptr; |
| + |
| + if (Shell::GetInstance()->in_mus()) { |
| + // Look up the root for the display nearest |root_window|. |
| + display::Display display = display::Screen::GetScreen()->GetDisplayMatching( |
| + root_window->GetBoundsInScreen()); |
| + aura::Window* root_window_for_display = |
| + Shell::GetInstance() |
| + ->window_tree_host_manager() |
| + ->GetRootWindowForDisplayId(display.id()); |
| + DCHECK(root_window_for_display); |
| + return GetRootWindowSettings(root_window_for_display)->controller; |
| + } |
| + return GetRootWindowSettings(root_window)->controller; |
|
oshima
2016/05/12 00:40:56
This behaves differently if the most of the root w
James Cook
2016/05/12 16:43:12
I'm sorry, I don't completely understand.
I under
|
| } |
| } // namespace ash |