| Index: ash/wm/workspace/workspace_window_resizer.cc
|
| diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc
|
| index 8369f66f6a2aa87e0a09c4f8f8358f3778cf47cc..67145f5db38384e0c769d536bc5a31f3e1a2abbb 100644
|
| --- a/ash/wm/workspace/workspace_window_resizer.cc
|
| +++ b/ash/wm/workspace/workspace_window_resizer.cc
|
| @@ -327,13 +327,10 @@ void WorkspaceWindowResizer::CompleteDrag(int event_flags) {
|
| // is called, so it does not matter.
|
| if (wm::IsWindowNormal(window()) &&
|
| (snap_type_ == SNAP_LEFT_EDGE || snap_type_ == SNAP_RIGHT_EDGE)) {
|
| - if (!GetRestoreBoundsInScreen(window())) {
|
| - gfx::Rect initial_bounds = ScreenAsh::ConvertRectToScreen(
|
| - window()->parent(), details_.initial_bounds_in_parent);
|
| - SetRestoreBoundsInScreen(window(), details_.restore_bounds.IsEmpty() ?
|
| - initial_bounds :
|
| - details_.restore_bounds);
|
| - }
|
| + if (!GetRestoreBoundsInScreen(window()))
|
| + SetRestoreBoundsInParent(window(), details_.restore_bounds.IsEmpty() ?
|
| + details_.initial_bounds :
|
| + details_.restore_bounds);
|
| window()->SetBounds(snap_sizer_->target_bounds());
|
| return;
|
| }
|
| @@ -365,12 +362,12 @@ void WorkspaceWindowResizer::RevertDrag() {
|
| if (!did_move_or_resize_)
|
| return;
|
|
|
| - window()->SetBounds(details_.initial_bounds_in_parent);
|
| + window()->SetBounds(details_.initial_bounds);
|
| if (!details_.restore_bounds.IsEmpty())
|
| SetRestoreBoundsInScreen(details_.window, details_.restore_bounds);
|
|
|
| if (details_.window_component == HTRIGHT) {
|
| - int last_x = details_.initial_bounds_in_parent.right();
|
| + int last_x = details_.initial_bounds.right();
|
| for (size_t i = 0; i < attached_windows_.size(); ++i) {
|
| gfx::Rect bounds(attached_windows_[i]->bounds());
|
| bounds.set_x(last_x);
|
| @@ -379,7 +376,7 @@ void WorkspaceWindowResizer::RevertDrag() {
|
| last_x = attached_windows_[i]->bounds().right();
|
| }
|
| } else {
|
| - int last_y = details_.initial_bounds_in_parent.bottom();
|
| + int last_y = details_.initial_bounds.bottom();
|
| for (size_t i = 0; i < attached_windows_.size(); ++i) {
|
| gfx::Rect bounds(attached_windows_[i]->bounds());
|
| bounds.set_y(last_y);
|
| @@ -477,7 +474,7 @@ void WorkspaceWindowResizer::LayoutAttachedWindows(
|
| gfx::Rect work_area(ScreenAsh::GetDisplayWorkAreaBoundsInParent(window()));
|
| std::vector<int> sizes;
|
| CalculateAttachedSizes(
|
| - PrimaryAxisSize(details_.initial_bounds_in_parent.size()),
|
| + PrimaryAxisSize(details_.initial_bounds.size()),
|
| PrimaryAxisSize(bounds.size()),
|
| PrimaryAxisCoordinate(bounds.right(), bounds.bottom()),
|
| PrimaryAxisCoordinate(work_area.right(), work_area.bottom()),
|
|
|