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

commit b5c6af459cfb6f6bab2489d54367717fbcfc5d64
Author:     Mark Jansen <[email protected]>
AuthorDate: Mon Aug 5 22:57:21 2019 +0200
Commit:     Mark Jansen <[email protected]>
CommitDate: Tue Aug 6 21:17:47 2019 +0200

    [WIN32SS] Exclude the entire menu from overlapping, not just the menu item
    CORE-15863
---
 win32ss/user/ntuser/menu.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c
index 7bf7bbd97ae..3ff90e9e330 100644
--- a/win32ss/user/ntuser/menu.c
+++ b/win32ss/user/ntuser/menu.c
@@ -3362,12 +3362,11 @@ static PMENU FASTCALL MENU_ShowSubPopup(PWND WndOwner, 
PMENU Menu, BOOL SelectFi
 
   pWnd = ValidateHwndNoErr(Menu->hWnd);
 
-  ParentRect = Rect;
-  if (pWnd)
+  /* Grab the rect of our (entire) parent menu, so we can try to not overlap 
it */
+  if (!IntGetWindowRect(pWnd, &ParentRect))
   {
-      POINT pt = {0, 0};
-      IntClientToScreen(pWnd, &pt);
-      RECTL_vOffsetRect(&ParentRect, pt.x, pt.y);
+      ERR("No pWnd\n");
+      ParentRect = Rect;
   }
 
   /* correct item if modified as a reaction to WM_INITMENUPOPUP message */

Reply via email to