mirror of
https://github.com/reactos/reactos.git
synced 2024-11-23 11:33:31 +08:00
[NTUSER] Check class style for CS_NOCLOSE instead of window style (#7123)
Change 'pWnd->style' to 'pWnd->pcls->style' to check for CS_NOCLOSE. Incorrect struct field was used for checking previously. Fixes a bug with Ad Muncher that did not close when clicking on the window title "X" button while being used with a Classic window style theme. Patch by I_Kill_Bugs. CORE-11569
This commit is contained in:
parent
736d81938a
commit
71bed0f5f8
@ -1478,7 +1478,7 @@ NC_DoButton(PWND pWnd, WPARAM wParam, LPARAM lParam)
|
||||
case HTCLOSE:
|
||||
SysMenu = IntGetSystemMenu(pWnd, FALSE);
|
||||
MenuState = IntGetMenuState(SysMenu ? UserHMGetHandle(SysMenu) : NULL, SC_CLOSE, MF_BYCOMMAND); /* in case of error MenuState==0xFFFFFFFF */
|
||||
if (!(Style & WS_SYSMENU) || (MenuState & (MF_GRAYED|MF_DISABLED)) || (pWnd->style & CS_NOCLOSE))
|
||||
if (!(Style & WS_SYSMENU) || (MenuState & (MF_GRAYED|MF_DISABLED)) || (pWnd->pcls->style & CS_NOCLOSE))
|
||||
return;
|
||||
ButtonType = DFCS_CAPTIONCLOSE;
|
||||
SCMsg = SC_CLOSE;
|
||||
|
Loading…
Reference in New Issue
Block a user