https://git.reactos.org/?p=reactos.git;a=commitdiff;h=64997887ebf21249f81f6…
commit 64997887ebf21249f81f628ee25a5913a24e6fdf
Author: Egor Ananyin <ananinegor(a)gmail.com>
AuthorDate: Thu Nov 2 02:11:46 2023 +0300
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Nov 1 23:11:46 2023 +0000
[NTUSER] Fix system menu mouse handing (#5822)
Add a check for the system menu opened from the app icon.
Fixes CORE-19258
---
win32ss/user/ntuser/menu.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c
index a5273ea2096..b02eb7b88cf 100644
--- a/win32ss/user/ntuser/menu.c
+++ b/win32ss/user/ntuser/menu.c
@@ -3555,7 +3555,9 @@ static BOOL FASTCALL MENU_ButtonDown(MTRACKER* pmt, PMENU PtMenu,
UINT Flags)
{
UINT id = 0;
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;
}
@@ -3599,7 +3601,8 @@ static INT FASTCALL MENU_ButtonUp(MTRACKER *pmt, PMENU PtMenu, UINT
Flags)
UINT Id = 0;
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;
}