Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: ash/wm/workspace/workspace_window_resizer.cc

Issue 11366215: Prevents windows in chromeos from resizing bigger than their maximum size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698