[NTUSER] Fix system menu mouse handing (#5822)

Add a check for the system menu opened from the app icon.
Fixes CORE-19258
This commit is contained in:
Egor Ananyin 2023-11-02 02:11:46 +03:00 committed by GitHub
parent c1b12b3f46
commit 64997887eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3555,7 +3555,9 @@ static BOOL FASTCALL MENU_ButtonDown(MTRACKER* pmt, PMENU PtMenu, UINT Flags)
{ {
UINT id = 0; UINT id = 0;
PITEM item; PITEM item;
if (IS_SYSTEM_MENU(PtMenu))
// Special check for the icon system menu
if (IS_SYSTEM_MENU(PtMenu) && !(PtMenu->fFlags & MNF_POPUP))
{ {
item = PtMenu->rgItems; item = PtMenu->rgItems;
} }
@ -3599,7 +3601,8 @@ static INT FASTCALL MENU_ButtonUp(MTRACKER *pmt, PMENU PtMenu, UINT Flags)
UINT Id = 0; UINT Id = 0;
ITEM *item; ITEM *item;
if ( IS_SYSTEM_MENU(PtMenu) ) // Special check for the icon system menu
if (IS_SYSTEM_MENU(PtMenu) && !(PtMenu->fFlags & MNF_POPUP))
{ {
item = PtMenu->rgItems; item = PtMenu->rgItems;
} }