summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-16 17:25:20 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-16 17:25:20 +0000
commit6bb9351eed552172a82ad1d7d5289a9383784a2b (patch)
tree20bef2308bdfef4f8f88b05309aef49838270691 /views
parent3c5c6d8d4dd6b6b6fd3115dbbe2b155b9eb207f9 (diff)
downloadchromium_src-6bb9351eed552172a82ad1d7d5289a9383784a2b.zip
chromium_src-6bb9351eed552172a82ad1d7d5289a9383784a2b.tar.gz
chromium_src-6bb9351eed552172a82ad1d7d5289a9383784a2b.tar.bz2
Fix closing the window by clicking the X.
I'm splitting this change out from my earlier CL because it's a more serious regression and I am still solving the capture issues separately. http://crbug.com/76144 TEST=see bug TBR=sky Review URL: http://codereview.chromium.org/6677081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78387 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/window/window_win.cc12
1 files changed, 1 insertions, 11 deletions
diff --git a/views/window/window_win.cc b/views/window/window_win.cc
index 4708df5..4f204da 100644
--- a/views/window/window_win.cc
+++ b/views/window/window_win.cc
@@ -142,16 +142,6 @@ void EnableMenuItem(HMENU menu, UINT command, bool enabled) {
EnableMenuItem(menu, command, flags);
}
-bool IsDwmRenderingWindowControls(HWND window) {
- if (base::win::GetVersion() < base::win::VERSION_VISTA)
- return false;
-
- DWMNCRENDERINGPOLICY policy;
- DwmGetWindowAttribute(window, DWMWA_NCRENDERING_POLICY, &policy,
- sizeof(policy));
- return policy == DWMNCRP_ENABLED;
-}
-
// If the hung renderer warning doesn't fit on screen, the amount of padding to
// be left between the edge of the window and the edge of the nearest monitor,
// after the window is nudged back on screen. Pixels.
@@ -627,7 +617,7 @@ LRESULT WindowWin::OnNCCalcSize(BOOL mode, LPARAM l_param) {
LRESULT WindowWin::OnNCHitTest(const CPoint& point) {
// If the DWM is rendering the window controls, we need to give the DWM's
// default window procedure first chance to handle hit testing.
- if (IsDwmRenderingWindowControls(GetNativeView())) {
+ if (ShouldUseNativeFrame()) {
LRESULT result;
if (DwmDefWindowProc(GetNativeView(), WM_NCHITTEST, 0,
MAKELPARAM(point.x, point.y), &result)) {