From fe53065a4e1053ef4b2a7b4fbde701fe065b40d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 12 Feb 2016 22:12:51 +0000 Subject: [PATCH] [UXTHEME] Temporarily disable the WS_EX_DLGMODALFRAME test whose presence broke opening the system menu when the user clicks on the window caption icon. This half-broken DefWndNCHitTest comes from user32; see r70718 for more details. svn path=/trunk/; revision=70719 --- reactos/dll/win32/uxtheme/nonclient.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/uxtheme/nonclient.c b/reactos/dll/win32/uxtheme/nonclient.c index 927dddf2e5d..e3a7470c76d 100644 --- a/reactos/dll/win32/uxtheme/nonclient.c +++ b/reactos/dll/win32/uxtheme/nonclient.c @@ -950,7 +950,7 @@ DefWndNCHitTest(HWND hWnd, POINT Point) ButtonWidth = GetSystemMetrics(SM_CXSIZE); ButtonWidth -= 4; - ButtonWidth+= BUTTON_GAP_SIZE; + ButtonWidth += BUTTON_GAP_SIZE; if (wi.dwStyle & WS_SYSMENU) { @@ -960,7 +960,13 @@ DefWndNCHitTest(HWND hWnd, POINT Point) } else { - if(!(wi.dwExStyle & WS_EX_DLGMODALFRAME)) + // if(!(wi.dwExStyle & WS_EX_DLGMODALFRAME)) + // FIXME: The real test should check whether there is + // an icon for the system window, and if so, do the + // rect.left increase. + // See win32ss/user/user32/windows/nonclient.c!DefWndNCHitTest + // and win32ss/user/ntuser/nonclient.c!GetNCHitEx which does + // the test better. WindowRect.left += ButtonWidth; WindowRect.right -= ButtonWidth; }