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

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

Issue 11369017: Use correct restore bounds in resizer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/frame_maximize_button.cc
diff --git a/ash/wm/workspace/frame_maximize_button.cc b/ash/wm/workspace/frame_maximize_button.cc
index 9334a8e2bb9e4123c172c31d3e719fc5fa4c80fc..b1dd59b5c24697d33a95734560bb8724a13f0451 100644
--- a/ash/wm/workspace/frame_maximize_button.cc
+++ b/ash/wm/workspace/frame_maximize_button.cc
@@ -510,8 +510,8 @@ void FrameMaximizeButton::Snap(const SnapSizer& snap_sizer) {
switch (snap_type_) {
case SNAP_LEFT:
case SNAP_RIGHT: {
- // Get the window coordinates on the screen for restore purposes.
- gfx::Rect restore = widget->GetNativeWindow()->bounds();
+ // Get the bounds in screen coordinates for restore purposes.
+ gfx::Rect restore = widget->GetWindowBoundsInScreen();
if (widget->IsMaximized()) {
// In case of maximized we have a restore boundary.
DCHECK(ash::GetRestoreBoundsInScreen(widget->GetNativeWindow()));
@@ -533,7 +533,7 @@ void FrameMaximizeButton::Snap(const SnapSizer& snap_sizer) {
}
// Remember the widow's bounds for restoration.
ash::SetRestoreBoundsInScreen(widget->GetNativeWindow(), restore);
- }
+ }
sky 2012/11/01 16:34:35 Put the break inside the {} and move } in two spac
oshima 2012/11/01 18:11:35 done. (original change was just indentation change
break;
case SNAP_MAXIMIZE:
widget->Maximize();

Powered by Google App Engine
This is Rietveld 408576698