Chromium Code Reviews| Index: ash/mus/root_window_controller.cc |
| diff --git a/ash/mus/root_window_controller.cc b/ash/mus/root_window_controller.cc |
| index f5da782f9ba624961ad47415a11f907d94d743bb..d81f7f4ec5c5dc600d9307c79c3689888ba67ec3 100644 |
| --- a/ash/mus/root_window_controller.cc |
| +++ b/ash/mus/root_window_controller.cc |
| @@ -102,9 +102,11 @@ ui::Window* RootWindowController::NewTopLevelWindow( |
| if (GetRequestedContainer(window, &container_id)) { |
| container_window = GetWindowByShellWindowId(container_id)->mus_window(); |
| } else { |
| - // TODO(sky): window->bounds() isn't quite right. |
| + gfx::Point origin = wm_root_window_controller_->ConvertPointToScreen( |
| + WmWindowMus::Get(root_), gfx::Point()); |
| + gfx::Rect bounds_in_screen(origin, window->bounds().size()); |
|
mfomitchev
2016/11/23 23:02:12
What if one of the window's parents is transformed
|
| container_window = WmWindowMus::GetMusWindow(wm::GetDefaultParent( |
| - WmWindowMus::Get(root_), WmWindowMus::Get(window), window->bounds())); |
| + WmWindowMus::Get(root_), WmWindowMus::Get(window), bounds_in_screen)); |
| } |
| DCHECK(WmWindowMus::Get(container_window)->IsContainer()); |