Index: ash/wm/window_resizer.cc |
diff --git a/ash/wm/window_resizer.cc b/ash/wm/window_resizer.cc |
index 98751066733aa715ee492ce66597f09b3fc70742..59deacdc1231d417370f9e1a4dc7dfc6f241a4af 100644 |
--- a/ash/wm/window_resizer.cc |
+++ b/ash/wm/window_resizer.cc |
@@ -7,6 +7,7 @@ |
#include "ash/screen_ash.h" |
#include "ash/shell.h" |
#include "ui/aura/client/aura_constants.h" |
+#include "ui/aura/client/screen_position_client.h" |
#include "ui/aura/root_window.h" |
#include "ui/aura/window.h" |
#include "ui/aura/window_delegate.h" |
@@ -183,11 +184,15 @@ int WindowResizer::AlignToGridRoundDown(int location, int grid_size) { |
// static |
gfx::Rect WindowResizer::CalculateBoundsForDrag( |
const Details& details, |
- const gfx::Point& location, |
+ const gfx::Point& location_in_screen, |
int grid_size) { |
if (!details.is_resizable) |
return details.initial_bounds; |
+ gfx::Point location = location_in_screen; |
+ aura::client::GetScreenPositionClient(details.window->GetRootWindow())-> |
+ ConvertPointFromScreen(details.window->GetRootWindow(), &location); |
+ |
int delta_x = location.x() - details.initial_location_in_parent.x(); |
int delta_y = location.y() - details.initial_location_in_parent.y(); |