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 67145f5db38384e0c769d536bc5a31f3e1a2abbb..f0d1e1a64f95ed34c57997ea2240c3b6caad6381 100644 |
--- a/ash/wm/workspace/workspace_window_resizer.cc |
+++ b/ash/wm/workspace/workspace_window_resizer.cc |
@@ -328,9 +328,9 @@ void WorkspaceWindowResizer::CompleteDrag(int event_flags) { |
if (wm::IsWindowNormal(window()) && |
(snap_type_ == SNAP_LEFT_EDGE || snap_type_ == SNAP_RIGHT_EDGE)) { |
if (!GetRestoreBoundsInScreen(window())) |
- SetRestoreBoundsInParent(window(), details_.restore_bounds.IsEmpty() ? |
- details_.initial_bounds : |
- details_.restore_bounds); |
+ SetRestoreBoundsInScreen(window(), details_.restore_bounds.IsEmpty() ? |
+ details_.initial_bounds : |
+ details_.restore_bounds); |
window()->SetBounds(snap_sizer_->target_bounds()); |
return; |
} |
@@ -362,12 +362,13 @@ void WorkspaceWindowResizer::RevertDrag() { |
if (!did_move_or_resize_) |
return; |
- window()->SetBounds(details_.initial_bounds); |
+ window()->SetBounds(details_.initial_bounds_in_parent); |
+ |
if (!details_.restore_bounds.IsEmpty()) |
SetRestoreBoundsInScreen(details_.window, details_.restore_bounds); |
if (details_.window_component == HTRIGHT) { |
- int last_x = details_.initial_bounds.right(); |
+ int last_x = details_.initial_bounds_in_parent.right(); |
for (size_t i = 0; i < attached_windows_.size(); ++i) { |
gfx::Rect bounds(attached_windows_[i]->bounds()); |
bounds.set_x(last_x); |
@@ -376,7 +377,7 @@ void WorkspaceWindowResizer::RevertDrag() { |
last_x = attached_windows_[i]->bounds().right(); |
} |
} else { |
- int last_y = details_.initial_bounds.bottom(); |
+ int last_y = details_.initial_bounds_in_parent.bottom(); |
for (size_t i = 0; i < attached_windows_.size(); ++i) { |
gfx::Rect bounds(attached_windows_[i]->bounds()); |
bounds.set_y(last_y); |