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 c82acf2ebd344393f11d20aa5513db4b0033d975..360817475676e1ce0a8ea3fa2dd320ed05a06334 100644 |
--- a/ash/wm/workspace/workspace_window_resizer.cc |
+++ b/ash/wm/workspace/workspace_window_resizer.cc |
@@ -462,6 +462,19 @@ void WorkspaceWindowResizer::CompleteDrag() { |
window_state()->Restore(); |
} |
} |
+ gfx::Rect maximized_bounds = ScreenUtil::GetMaximizedWindowBoundsInParent( |
+ GetTarget()); |
+ if (!snapped && |
msw
2014/07/30 05:46:37
nit: a brief comment for this block would be nice.
varkha
2014/07/30 21:03:15
Done.
|
+ GetTarget()->bounds() == maximized_bounds && |
+ window_state()->CanMaximize()) { |
+ gfx::Rect initial_bounds = ScreenUtil::ConvertRectToScreen( |
+ GetTarget()->parent(), details().initial_bounds_in_parent); |
+ window_state()->SetRestoreBoundsInScreen( |
+ details().restore_bounds.IsEmpty() ? |
+ initial_bounds : |
+ details().restore_bounds); |
+ window_state()->Maximize(); |
+ } |
} |
void WorkspaceWindowResizer::RevertDrag() { |