From cf213c0fc98fd1849e3e0eb644e9dd09349afc54 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Mon, 6 Nov 2006 10:20:40 +0000 Subject: [PATCH] Revert 24074 by Saveliy Tretiakov until correct fix available. Fixes bug with moveable calculator buttons. svn path=/trunk/; revision=24693 --- reactos/dll/win32/user32/windows/nonclient.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/reactos/dll/win32/user32/windows/nonclient.c b/reactos/dll/win32/user32/windows/nonclient.c index b403ab1061b..6510554a6c4 100644 --- a/reactos/dll/win32/user32/windows/nonclient.c +++ b/reactos/dll/win32/user32/windows/nonclient.c @@ -735,7 +735,7 @@ DefWndNCHitTest(HWND hWnd, POINT Point) return HTBORDER; } - if (Style & WS_CAPTION) + if ((Style & WS_CAPTION) == WS_CAPTION) { if (ExStyle & WS_EX_TOOLWINDOW) WindowRect.top += GetSystemMetrics(SM_CYSMCAPTION); @@ -751,15 +751,11 @@ DefWndNCHitTest(HWND hWnd, POINT Point) } else { + WindowRect.left += GetSystemMetrics(SM_CXSIZE); WindowRect.right -= GetSystemMetrics(SM_CXSIZE); } - - // On windows with WS_EX_DLGMODALFRAME and - // WS_EX_TOOLWINDOW there is no system menu button. - if (!(ExStyle & WS_EX_DLGMODALFRAME) && !(ExStyle & WS_EX_TOOLWINDOW)) - WindowRect.left += GetSystemMetrics(SM_CXSIZE); } - if (Point.x < WindowRect.left) + if (Point.x <= WindowRect.left) return HTSYSMENU; if (WindowRect.right <= Point.x) return HTCLOSE;