summaryrefslogtreecommitdiffstats
path: root/chrome/browser/window_sizer.cc
diff options
context:
space:
mode:
authoryuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 06:20:48 +0000
committeryuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 06:20:48 +0000
commit43b5ff2e230aad8ebde1ac7c1aeccc1c7cf97d2c (patch)
tree0557863b23155ddb28b55458584e6d671ccbba57 /chrome/browser/window_sizer.cc
parentae155cb97116363c783eb4e5c6277bef8336b0cf (diff)
downloadchromium_src-43b5ff2e230aad8ebde1ac7c1aeccc1c7cf97d2c.zip
chromium_src-43b5ff2e230aad8ebde1ac7c1aeccc1c7cf97d2c.tar.gz
chromium_src-43b5ff2e230aad8ebde1ac7c1aeccc1c7cf97d2c.tar.bz2
Fix: New window appears to the left/up if the taskbar is on left/top.
Currently, the Windows taskbar (put differently, work area) is not considered in getting the last window bounds (while it is for the saved window bounds). This causes new windows (CTRL-N) appear to the left/up of the existing window instead of right/down, if the taskbar is on left or top. TESTED=gcl try, manually TEST=Place the taskbar on left or top of the screen and create new Chrome windows by CTRL-N and observe. BUG=14131 Review URL: http://codereview.chromium.org/125179 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18795 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/window_sizer.cc')
-rw-r--r--chrome/browser/window_sizer.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/window_sizer.cc b/chrome/browser/window_sizer.cc
index 74956d2..59eed33 100644
--- a/chrome/browser/window_sizer.cc
+++ b/chrome/browser/window_sizer.cc
@@ -151,6 +151,7 @@ bool WindowSizer::GetLastWindowBounds(gfx::Rect* bounds) const {
if (!state_provider_ || !state_provider_->GetLastActiveWindowState(bounds))
return false;
gfx::Rect last_window_bounds = *bounds;
+ bounds->Offset(monitor_info_provider_->GetBoundsOffsetMatching(*bounds));
bounds->Offset(kWindowTilePixels, kWindowTilePixels);
AdjustBoundsToBeVisibleOnMonitorContaining(last_window_bounds, bounds);
return true;
@@ -162,9 +163,7 @@ bool WindowSizer::GetSavedWindowBounds(gfx::Rect* bounds,
if (!state_provider_ ||
!state_provider_->GetPersistentState(bounds, maximized))
return false;
- const gfx::Point& taskbar_offset =
- monitor_info_provider_->GetBoundsOffsetMatching(*bounds);
- bounds->Offset(taskbar_offset.x(), taskbar_offset.y());
+ bounds->Offset(monitor_info_provider_->GetBoundsOffsetMatching(*bounds));
AdjustBoundsToBeVisibleOnMonitorContaining(*bounds, bounds);
return true;
}