| Index: ash/root_window_controller.cc
|
| diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
|
| index d4e9d54f46839f0cdd8618e43dbd7a68b361a19d..7d6b190fae017942f508c57aa6184bc199f63af3 100644
|
| --- a/ash/root_window_controller.cc
|
| +++ b/ash/root_window_controller.cc
|
| @@ -1056,7 +1056,22 @@ 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()) {
|
| + // On mus, like desktop aura, each top-level widget has its own root window,
|
| + // so |root_window| is not necessarily the display's root. For now, just
|
| + // the use the primary display root.
|
| + // TODO(jamescook): Multi-display support. This depends on how mus windows
|
| + // will be owned by displays.
|
| + aura::Window* primary_root_window = Shell::GetInstance()
|
| + ->window_tree_host_manager()
|
| + ->GetPrimaryRootWindow();
|
| + return GetRootWindowSettings(primary_root_window)->controller;
|
| + }
|
| +
|
| + return GetRootWindowSettings(root_window)->controller;
|
| }
|
|
|
| } // namespace ash
|
|
|