summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/views/frame/browser_frame_win.cc9
-rw-r--r--views/window/window_win.cc7
2 files changed, 10 insertions, 6 deletions
diff --git a/chrome/browser/views/frame/browser_frame_win.cc b/chrome/browser/views/frame/browser_frame_win.cc
index 696e109..d12963f 100644
--- a/chrome/browser/views/frame/browser_frame_win.cc
+++ b/chrome/browser/views/frame/browser_frame_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -139,8 +139,11 @@ gfx::Insets BrowserFrameWin::GetClientAreaInsets() const {
}
int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
- // We draw our own client edge over part of the default frame.
- if (!IsMaximized())
+ // In fullscreen mode, we have no frame. In restored mode, we draw our own
+ // client edge over part of the default frame.
+ if (IsFullscreen())
+ border_thickness = 0;
+ else if (!IsMaximized())
border_thickness -= kClientEdgeThickness;
return gfx::Insets(0, border_thickness, border_thickness, border_thickness);
}
diff --git a/views/window/window_win.cc b/views/window/window_win.cc
index 18857fa..d357768 100644
--- a/views/window/window_win.cc
+++ b/views/window/window_win.cc
@@ -740,10 +740,11 @@ LRESULT WindowWin::OnNCActivate(BOOL active) {
}
LRESULT WindowWin::OnNCCalcSize(BOOL mode, LPARAM l_param) {
- // We only override WM_NCCALCSIZE if we want non-standard non-client edge
- // width.
+ // We only override the default handling if we need to specify a custom
+ // non-client edge width. Note that in most cases "no insets" means no
+ // custom width, but in fullscreen mode we want a custom width of 0.
gfx::Insets insets = GetClientAreaInsets();
- if (insets.empty())
+ if (insets.empty() && !IsFullscreen())
return WidgetWin::OnNCCalcSize(mode, l_param);
RECT* client_rect = mode ?