summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-01 02:05:07 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-01 02:05:07 +0000
commit7f5e84dd9a86e0efcbdd0bf6c35b4f0ecaff58d9 (patch)
treead15eba0d1f291c352a4ce0ddc5fed5ca0f8d61c /chrome/browser/views
parenta2ebc68fd35bf1cfb955a6185b9af84acb1a79a3 (diff)
downloadchromium_src-7f5e84dd9a86e0efcbdd0bf6c35b4f0ecaff58d9.zip
chromium_src-7f5e84dd9a86e0efcbdd0bf6c35b4f0ecaff58d9.tar.gz
chromium_src-7f5e84dd9a86e0efcbdd0bf6c35b4f0ecaff58d9.tar.bz2
Fix distributor logo placement on glass frame when window is restored from fullscreen.
Force a layout in WM_NCCALCSIZE since NC metrics can change as a result of handling this message. http://crbug.com/8511 Review URL: http://codereview.chromium.org/56086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12930 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/frame/browser_frame.cc9
-rw-r--r--chrome/browser/views/frame/browser_view.cc1
2 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/views/frame/browser_frame.cc b/chrome/browser/views/frame/browser_frame.cc
index b837c4b..8255372 100644
--- a/chrome/browser/views/frame/browser_frame.cc
+++ b/chrome/browser/views/frame/browser_frame.cc
@@ -165,6 +165,15 @@ LRESULT BrowserFrame::OnNCCalcSize(BOOL mode, LPARAM l_param) {
UpdateDWMFrame();
+ // Non-client metrics such as the window control positions may change as a
+ // result of us processing this message so we need to re-layout the frame view
+ // which may position items (such as the distributor logo) based on these
+ // metrics. We only do this once the non-client view has been properly
+ // initialized and added to the view hierarchy.
+ views::NonClientView* non_client_view = GetNonClientView();
+ if (non_client_view && non_client_view->GetParent())
+ non_client_view->LayoutFrameView();
+
// We'd like to return WVR_REDRAW in some cases here, but because we almost
// always have nonclient area (except in fullscreen mode, where it doesn't
// matter), we can't. See comments in window.cc:OnNCCalcSize() for more info.
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 79a1978..d0c3e07 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -204,6 +204,7 @@ BrowserView::BrowserView(Browser* browser)
browser_(browser),
active_bookmark_bar_(NULL),
active_download_shelf_(NULL),
+ tabstrip_(NULL),
toolbar_(NULL),
infobar_container_(NULL),
find_bar_y_(0),