summaryrefslogtreecommitdiffstats
path: root/views/window
diff options
context:
space:
mode:
authoryuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-09 04:58:29 +0000
committeryuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-09 04:58:29 +0000
commitc4352289f494605ff3a379f70206e29c3e250a16 (patch)
tree024bc6159bb9a0b0ec9eb4d7b3c11ea5202fcbb7 /views/window
parente44060d11555020763fc7978b963707d6aa7833d (diff)
downloadchromium_src-c4352289f494605ff3a379f70206e29c3e250a16.zip
chromium_src-c4352289f494605ff3a379f70206e29c3e250a16.tar.gz
chromium_src-c4352289f494605ff3a379f70206e29c3e250a16.tar.bz2
Fix: Position always off-screen when starting up
Fixed the offset-by-taskbar logic. Tested with dual monitors, trying left-right and up-down monitor layouts. TEST=Use dual monitors (first:left, second:right) and open, close, and reopen Chromium in the second (right) window. Without this change, the window appears far to the right from the last location. BUG=15199 Review URL: http://codereview.chromium.org/155201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20246 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window')
-rw-r--r--views/window/window_win.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/views/window/window_win.cc b/views/window/window_win.cc
index 2c17531..03d3952 100644
--- a/views/window/window_win.cc
+++ b/views/window/window_win.cc
@@ -1371,7 +1371,8 @@ void WindowWin::GetWindowBoundsAndMaximizedState(gfx::Rect* bounds,
DCHECK(succeeded);
*bounds = gfx::Rect(wp.rcNormalPosition);
// Convert normal position from workarea coordinates to screen coordinates.
- bounds->Offset(mi.rcWork.left, mi.rcWork.top);
+ bounds->Offset(mi.rcWork.left - mi.rcMonitor.left,
+ mi.rcWork.top - mi.rcMonitor.top);
}
if (maximized != NULL)