summaryrefslogtreecommitdiffstats
path: root/views/window/window_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/window/window_win.cc')
-rw-r--r--views/window/window_win.cc14
1 files changed, 2 insertions, 12 deletions
diff --git a/views/window/window_win.cc b/views/window/window_win.cc
index 4708df5..301b5099 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)) {
@@ -683,7 +673,7 @@ LRESULT WindowWin::OnNCMouseRange(UINT message,
// We SetCapture() to ensure we only show the menu when the button down and
// up are both on the caption. Note: this causes the button up to be
// WM_RBUTTONUP instead of WM_NCRBUTTONUP.
- SetCapture();
+ SetNativeCapture();
}
WidgetWin::OnNCMouseRange(message, w_param, l_param);