mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -1478,7 +1478,7 @@ NC_DoButton(PWND pWnd, WPARAM wParam, LPARAM lParam)
|
||||||
case HTCLOSE:
|
case HTCLOSE:
|
||||||
SysMenu = IntGetSystemMenu(pWnd, FALSE);
|
SysMenu = IntGetSystemMenu(pWnd, FALSE);
|
||||||
MenuState = IntGetMenuState(SysMenu ? UserHMGetHandle(SysMenu) : NULL, SC_CLOSE, MF_BYCOMMAND); /* in case of error MenuState==0xFFFFFFFF */
|
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;
|
return;
|
||||||
ButtonType = DFCS_CAPTIONCLOSE;
|
ButtonType = DFCS_CAPTIONCLOSE;
|
||||||
SCMsg = SC_CLOSE;
|
SCMsg = SC_CLOSE;
|
||||||
|
|
Loading…
Reference in a new issue