diff options
author | idanan@chromium.org <idanan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 04:51:26 +0000 |
---|---|---|
committer | idanan@chromium.org <idanan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 04:51:26 +0000 |
commit | 2226eb1ef4b32cf154205505c4b5bc40327b6efe (patch) | |
tree | 3c875c5d9a8b3316a59517945e6011e9711d656f /chrome/browser/views/frame/browser_view.cc | |
parent | df2013932664ec3718248ed7c6f41445bb939a10 (diff) | |
download | chromium_src-2226eb1ef4b32cf154205505c4b5bc40327b6efe.zip chromium_src-2226eb1ef4b32cf154205505c4b5bc40327b6efe.tar.gz chromium_src-2226eb1ef4b32cf154205505c4b5bc40327b6efe.tar.bz2 |
Issue 7318: Popup Titlebar Appears Under Windows Taskbar
Simple fix to make sure the task bar placement and size is
taking into consideration when placing a new popup window.
BUG=7318
Review URL: http://codereview.chromium.org/29002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10585 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/frame/browser_view.cc')
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index 785229d..8ac669c 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -39,6 +39,7 @@ #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/web_contents.h" #include "chrome/browser/tab_contents/web_contents_view.h" +#include "chrome/browser/window_sizer.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/drag_drop_types.h" #include "chrome/common/l10n_util.h" @@ -80,8 +81,6 @@ static const int kSeparationLineHeight = 1; // The name of a key to store on the window handle so that other code can // locate this object using just the handle. static const wchar_t* kBrowserViewKey = L"__BROWSER_VIEW__"; -// The distance between tiled windows. -static const int kWindowTilePixels = 10; // How frequently we check for hung plugin windows. static const int kDefaultHungPluginDetectFrequency = 2000; // How long do we wait before we consider a window hung (in ms). @@ -1049,8 +1048,8 @@ bool BrowserView::GetSavedWindowBounds(gfx::Rect* bounds) const { // When we are given x/y coordinates of 0 on a created popup window, // assume none were given by the window.open() command. if (window_rect.x() == 0 && window_rect.y() == 0) { - window_rect.set_origin(GetNormalBounds().origin()); - window_rect.Offset(kWindowTilePixels, kWindowTilePixels); + gfx::Size size = window_rect.size(); + window_rect.set_origin(WindowSizer::GetDefaultPopupOrigin(size)); } *bounds = window_rect; |