Index: ash/wm/base_layout_manager.cc |
diff --git a/ash/wm/base_layout_manager.cc b/ash/wm/base_layout_manager.cc |
index 1bf6434a25bc2630241e83748ecabc269df41e42..78019cdb64c400b6118097aca6f284125c8f8417 100644 |
--- a/ash/wm/base_layout_manager.cc |
+++ b/ash/wm/base_layout_manager.cc |
@@ -224,7 +224,9 @@ void BaseLayoutManager::AdjustWindowSizesForScreenChange() { |
gfx::Rect display_rect = |
ScreenAsh::GetDisplayWorkAreaBoundsInParent(window); |
// Put as much of the window as possible within the display area. |
- window->SetBounds(window->bounds().AdjustToFit(display_rect)); |
+ gfx::Rect bounds = window->bounds(); |
+ bounds.AdjustToFit(display_rect); |
+ window->SetBounds(bounds); |
} |
} |
} |