| Index: ash/wm/window_resizer.cc
|
| diff --git a/ash/wm/window_resizer.cc b/ash/wm/window_resizer.cc
|
| index ef44c9bac6b5d232978fe02e8e5153961e4426d5..5d53b2167936b2fa8ee3fe5bffc32d5d7ac5288c 100644
|
| --- a/ash/wm/window_resizer.cc
|
| +++ b/ash/wm/window_resizer.cc
|
| @@ -114,18 +114,19 @@ WindowResizer::Details::Details()
|
| WindowResizer::Details::Details(aura::Window* window,
|
| const gfx::Point& location,
|
| int window_component)
|
| - : window(window),
|
| - initial_bounds(window->bounds()),
|
| - restore_bounds(gfx::Rect()),
|
| - initial_location_in_parent(location),
|
| - initial_opacity(window->layer()->opacity()),
|
| - window_component(window_component),
|
| - bounds_change(GetBoundsChangeForWindowComponent(window_component)),
|
| - position_change_direction(
|
| - GetPositionChangeDirectionForWindowComponent(window_component)),
|
| - size_change_direction(
|
| - GetSizeChangeDirectionForWindowComponent(window_component)),
|
| - is_resizable(bounds_change != kBoundsChangeDirection_None) {
|
| + : window(window),
|
| + initial_bounds_in_parent(window->bounds()),
|
| + initial_bounds(window->GetBoundsInScreen()),
|
| + restore_bounds(gfx::Rect()),
|
| + initial_location_in_parent(location),
|
| + initial_opacity(window->layer()->opacity()),
|
| + window_component(window_component),
|
| + bounds_change(GetBoundsChangeForWindowComponent(window_component)),
|
| + position_change_direction(
|
| + GetPositionChangeDirectionForWindowComponent(window_component)),
|
| + size_change_direction(
|
| + GetSizeChangeDirectionForWindowComponent(window_component)),
|
| + is_resizable(bounds_change != kBoundsChangeDirection_None) {
|
| if (wm::IsWindowNormal(window) &&
|
| GetRestoreBoundsInScreen(window) &&
|
| window_component == HTCAPTION)
|
| @@ -173,7 +174,7 @@ gfx::Rect WindowResizer::CalculateBoundsForDrag(
|
| const Details& details,
|
| const gfx::Point& passed_location) {
|
| if (!details.is_resizable)
|
| - return details.initial_bounds;
|
| + return details.initial_bounds_in_parent;
|
|
|
| gfx::Point location = passed_location;
|
| gfx::Rect work_area =
|
| @@ -237,7 +238,7 @@ gfx::Rect WindowResizer::CalculateBoundsForDrag(
|
| // However - it is not desirable to change the origin if the window would
|
| // be still hit by the cursor.
|
| if (details.initial_location_in_parent.x() >
|
| - details.initial_bounds.x() + details.restore_bounds.width())
|
| + details.initial_bounds_in_parent.x() + details.restore_bounds.width())
|
| new_bounds.set_x(location.x() - details.restore_bounds.width() / 2);
|
| }
|
|
|
| @@ -277,7 +278,7 @@ bool WindowResizer::IsBottomEdge(int window_component) {
|
| gfx::Point WindowResizer::GetOriginForDrag(const Details& details,
|
| int delta_x,
|
| int delta_y) {
|
| - gfx::Point origin = details.initial_bounds.origin();
|
| + gfx::Point origin = details.initial_bounds_in_parent.origin();
|
| if (details.bounds_change & kBoundsChange_Repositions) {
|
| int pos_change_direction =
|
| GetPositionChangeDirectionForWindowComponent(details.window_component);
|
|
|