summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 00:16:08 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 00:16:08 +0000
commitff3142f7116a3a514cf5f0025fae7501cd7dba16 (patch)
treeb687cfa9761971d1e6a9b2a4fe5efe0532ee0df5 /chrome
parentf6afff3feb06da707b9c2bc42383ede292929476 (diff)
downloadchromium_src-ff3142f7116a3a514cf5f0025fae7501cd7dba16.zip
chromium_src-ff3142f7116a3a514cf5f0025fae7501cd7dba16.tar.gz
chromium_src-ff3142f7116a3a514cf5f0025fae7501cd7dba16.tar.bz2
Fix client edge insets for fullscreen mode. we were incorrectly insetting the client area in fullscreen mode even though there are no non-client edges in fullscreen mode. This involves:
1. adding a check for IsFullscreen to the BrowserFrameWin code that calculates the client area insets for fullscreen state, just as it currently checks for maximized state. 2. bypass the WindowWin's sanity check for default insets in the Fullscreen case - in fullscreen mode the window should have zero non-client, not default restored non-client. http://crbug.com/37588 http://crbug.com/39076 Review URL: http://codereview.chromium.org/1618009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44029 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/frame/browser_frame_win.cc9
1 files changed, 6 insertions, 3 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);
}