https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6948764b21da483b7d0fb6eab8dab0835525d906

commit 6948764b21da483b7d0fb6eab8dab0835525d906
Author:     Mark Jansen <[email protected]>
AuthorDate: Wed Aug 7 23:53:42 2019 +0200
Commit:     Mark Jansen <[email protected]>
CommitDate: Thu Aug 8 19:51:28 2019 +0200

    [WIN32SS] Ensure the last menu item is not accidentally selected when a 
system menu is off-screen
    CORE-16297
---
 win32ss/user/ntuser/menu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c
index 724501c2c5a..a826ddbc58c 100644
--- a/win32ss/user/ntuser/menu.c
+++ b/win32ss/user/ntuser/menu.c
@@ -3405,6 +3405,8 @@ static PMENU FASTCALL MENU_ShowSubPopup(PWND WndOwner, 
PMENU Menu, BOOL SelectFi
       MENU_InitSysMenuPopup(Item->spSubMenu, pWnd->style, pWnd->pcls->style, 
HTSYSMENU);
 
       NC_GetSysPopupPos(pWnd, &Rect);
+      /* Ensure we do not overlap this */
+      ParentRect = Rect;
       if (Flags & TPM_LAYOUTRTL) Rect.left = Rect.right;
       Rect.top = Rect.bottom;
       Rect.right = UserGetSystemMetrics(SM_CXSIZE);

Reply via email to