X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=win32ss%2Fuser%2Fntuser%2Fmenu.c;h=ecf67761dd3865ba9966c1371597820b7354e820;hp=13af632520d768ef0b43aab5950f34c7fa19234e;hb=3cbdcc6363666db43ec82cd119f7f2536470fa93;hpb=f7e39f7d2ad68b26cce7d3e3cbc4bf6867bd564c diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c index 13af632520d..ecf67761dd3 100644 --- a/win32ss/user/ntuser/menu.c +++ b/win32ss/user/ntuser/menu.c @@ -3354,10 +3354,20 @@ static PMENU FASTCALL MENU_ShowSubPopup(PWND WndOwner, PMENU Menu, BOOL SelectFi pWnd = ValidateHwndNoErr(Menu->hWnd); /* Grab the rect of our (entire) parent menu, so we can try to not overlap it */ - if (!IntGetWindowRect(pWnd, &ParentRect)) + if (Menu->fFlags & MNF_POPUP) { - ERR("No pWnd\n"); - ParentRect = Rect; + if (!IntGetWindowRect(pWnd, &ParentRect)) + { + ERR("No pWnd\n"); + ParentRect = Rect; + } + } + else + { + /* Inside the menu bar, we do not want to grab the entire window... */ + ParentRect = Rect; + if (pWnd) + RECTL_vOffsetRect(&ParentRect, pWnd->rcWindow.left, pWnd->rcWindow.top); } /* correct item if modified as a reaction to WM_INITMENUPOPUP message */