mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[WIN32SS][NTUSER] Fix hit test position of popup menu
The submenu of desktop popup menu was erroneously shown at first right click. - Fix the hit test position that was modified by window style change. CORE-16382
This commit is contained in:
parent
dff75d7162
commit
81e27f0be7
|
@ -1480,11 +1480,16 @@ MENU_AdjustMenuItemRect(PMENU menu, PRECTL rect)
|
|||
static ITEM *MENU_FindItemByCoords( MENU *menu, POINT pt, UINT *pos )
|
||||
{
|
||||
ITEM *item;
|
||||
UINT i;
|
||||
UINT i, cx, cy;
|
||||
RECT rect;
|
||||
PWND pWnd = ValidateHwndNoErr(menu->hWnd);
|
||||
|
||||
if (!IntGetWindowRect(pWnd, &rect)) return NULL;
|
||||
|
||||
cx = UserGetSystemMetrics(SM_CXDLGFRAME);
|
||||
cy = UserGetSystemMetrics(SM_CYDLGFRAME);
|
||||
RECTL_vInflateRect(&rect, -cx, -cy);
|
||||
|
||||
if (pWnd->ExStyle & WS_EX_LAYOUTRTL)
|
||||
pt.x = rect.right - 1 - pt.x;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue