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

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

Issue 11110004: Make gfx::Rect class operations consistently mutate the class they are called on. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: cc/ fixes Created 8 years, 2 months 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
« no previous file with comments | « ash/wm/window_util.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_layout_manager2.cc
diff --git a/ash/wm/workspace/workspace_layout_manager2.cc b/ash/wm/workspace/workspace_layout_manager2.cc
index 6731557b2189c504ac9831d30dd278668e1bce9b..29e4c6c04e27512b33b0fd891465b88607a850ba 100644
--- a/ash/wm/workspace/workspace_layout_manager2.cc
+++ b/ash/wm/workspace/workspace_layout_manager2.cc
@@ -289,7 +289,9 @@ void WorkspaceLayoutManager2::AdjustWindowSizeForScreenChange(
if (reason == ADJUST_WINDOW_SCREEN_SIZE_CHANGED) {
// The work area may be smaller than the full screen. Put as much of the
// window as possible within the display area.
- window->SetBounds(window->bounds().AdjustToFit(work_area_));
+ gfx::Rect bounds = window->bounds();
+ bounds.AdjustToFit(work_area_);
+ window->SetBounds(bounds);
} else if (reason == ADJUST_WINDOW_DISPLAY_INSETS_CHANGED) {
// If the window is completely outside the display work area, then move it
// enough to be visible again.
« no previous file with comments | « ash/wm/window_util.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698