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

Unified Diff: ui/base/win/hwnd_util.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 | « ui/base/native_theme/native_theme_base.cc ('k') | ui/gfx/blit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/win/hwnd_util.cc
diff --git a/ui/base/win/hwnd_util.cc b/ui/base/win/hwnd_util.cc
index 60efa0c45fefbfb3b552844969404e289f238d31..b6fc171472a210abee02dda394ef961cd0b20a6c 100644
--- a/ui/base/win/hwnd_util.cc
+++ b/ui/base/win/hwnd_util.cc
@@ -25,7 +25,8 @@ void AdjustWindowToFit(HWND hwnd, const RECT& bounds, bool fit_to_monitor) {
GetMonitorInfo(hmon, &mi);
gfx::Rect window_rect(bounds);
gfx::Rect monitor_rect(mi.rcWork);
- gfx::Rect new_window_rect = window_rect.AdjustToFit(monitor_rect);
+ gfx::Rect new_window_rect = window_rect;
+ new_window_rect.AdjustToFit(monitor_rect);
if (new_window_rect != window_rect) {
// Window doesn't fit on monitor, move and possibly resize.
SetWindowPos(hwnd, 0, new_window_rect.x(), new_window_rect.y(),
« no previous file with comments | « ui/base/native_theme/native_theme_base.cc ('k') | ui/gfx/blit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698