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 eda27a49ffe996678e1bd012d82c7d571eef7948..54bc6ca7169636e2bb85185558f947c750311735 100644 |
--- a/ash/wm/workspace/workspace_window_resizer.cc |
+++ b/ash/wm/workspace/workspace_window_resizer.cc |
@@ -754,6 +754,10 @@ void WorkspaceWindowResizer::UpdateSnapPhantomWindow(const gfx::Point& location, |
if (!did_move_or_resize_ || details_.window_component != HTCAPTION) |
return; |
+ // If a window has a maximum size defined, snapping may make it too big. |
+ if (!window()->delegate()->GetMaximumSize().IsEmpty()) |
jeremya
2012/11/15 01:12:43
Maybe abstract this into ash::wm::CanSnapWindow()
koz (OOO until 15th September)
2012/11/15 02:46:13
Done.
|
+ return; |
+ |
SnapType last_type = snap_type_; |
snap_type_ = GetSnapType(location); |
if (snap_type_ == SNAP_NONE || snap_type_ != last_type) { |