Chromium Code Reviews| 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 3617da52255642d59fae53fbb811d881222546b1..dd2992e9017e5ed42a933c9c03b77d45debfd4cc 100644 |
| --- a/ash/wm/workspace/workspace_window_resizer.cc |
| +++ b/ash/wm/workspace/workspace_window_resizer.cc |
| @@ -436,6 +436,7 @@ void WorkspaceWindowResizer::CompleteDrag(int event_flags) { |
| if (!did_move_or_resize_ || details_.window_component != HTCAPTION) |
| return; |
| + bool is_snapped = false; |
|
pkotwicz
2013/11/27 20:24:43
Can you renamed to |snapped| ? I THINK that it is
varkha
2013/11/28 01:09:37
Done.
|
| // When the window is not in the normal show state, we do not snap the window. |
| // This happens when the user minimizes or maximizes the window by keyboard |
| // shortcut while dragging it. If the window is the result of dragging a tab |
| @@ -458,8 +459,11 @@ void WorkspaceWindowResizer::CompleteDrag(int event_flags) { |
| if (window_state()->CanResize() && |
| !dock_layout_->is_dragged_window_docked()) { |
| snap_sizer_->SnapWindowToTargetBounds(); |
| + is_snapped = true; |
| } |
| } |
| + if (window_state()->IsSnapped() && !is_snapped) |
| + window_state()->Restore(); |
| } |
| void WorkspaceWindowResizer::RevertDrag() { |