From ad12c6cdea05e2164396e3794e9bee7b821cc709 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Tue, 31 Oct 2023 06:50:00 +0900 Subject: [PATCH] [NTUSER] Disable SC_MOVE if WS_MAXIMIZE or WS_MINIMIZE (#5855) Based on KRosUser's scmove.patch. - Check also WS_MINIMIZE window style to determine to disable SC_MOVE system command. CORE-19272 --- win32ss/user/ntuser/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c index 6b2f242cc25..a5273ea2096 100644 --- a/win32ss/user/ntuser/menu.c +++ b/win32ss/user/ntuser/menu.c @@ -1366,7 +1366,7 @@ void FASTCALL MENU_InitSysMenuPopup(PMENU menu, DWORD style, DWORD clsStyle, LON gray = !(style & WS_THICKFRAME) || (style & (WS_MAXIMIZE | WS_MINIMIZE)); IntEnableMenuItem( menu, SC_SIZE, (gray ? MF_GRAYED : MF_ENABLED) ); - gray = ((style & WS_MAXIMIZE) != 0); + gray = ((style & (WS_MAXIMIZE | WS_MINIMIZE)) != 0); IntEnableMenuItem( menu, SC_MOVE, (gray ? MF_GRAYED : MF_ENABLED) ); gray = !(style & WS_MINIMIZEBOX) || (style & WS_MINIMIZE); IntEnableMenuItem( menu, SC_MINIMIZE, (gray ? MF_GRAYED : MF_ENABLED) );