Index: components/exo/display.cc |
diff --git a/components/exo/display.cc b/components/exo/display.cc |
index 72970f17125ca0eaf7158a2c60738bf57926647b..4d51b34c49e0b5566f2ef760f2480a542d2c319d 100644 |
--- a/components/exo/display.cc |
+++ b/components/exo/display.cc |
@@ -19,7 +19,6 @@ |
#include "components/exo/sub_surface.h" |
#include "components/exo/surface.h" |
#include "ui/views/widget/widget.h" |
-#include "ui/wm/core/coordinate_conversion.h" |
#if defined(USE_OZONE) |
#include <GLES2/gl2extchromium.h> |
@@ -136,13 +135,13 @@ |
} |
// Determine the initial bounds for popup. |position| is relative to the |
- // parent's main surface origin and initial bounds are in screen coordinates. |
- gfx::Point origin = position; |
- wm::ConvertPointToScreen( |
+ // parent's main surface origin and initial bounds are relative to the |
+ // container origin. |
+ gfx::Rect initial_bounds(position, gfx::Size(1, 1)); |
+ aura::Window::ConvertRectToTarget( |
ShellSurface::GetMainSurface(parent->GetWidget()->GetNativeWindow()) |
->window(), |
- &origin); |
- gfx::Rect initial_bounds(origin, gfx::Size(1, 1)); |
+ parent->GetWidget()->GetNativeWindow()->parent(), &initial_bounds); |
return base::WrapUnique( |
new ShellSurface(surface, parent, initial_bounds, false /* activatable */, |