mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 17:03:02 +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
1 changed files with 6 additions and 1 deletions
|
@ -1480,11 +1480,16 @@ MENU_AdjustMenuItemRect(PMENU menu, PRECTL rect)
|
||||||
static ITEM *MENU_FindItemByCoords( MENU *menu, POINT pt, UINT *pos )
|
static ITEM *MENU_FindItemByCoords( MENU *menu, POINT pt, UINT *pos )
|
||||||
{
|
{
|
||||||
ITEM *item;
|
ITEM *item;
|
||||||
UINT i;
|
UINT i, cx, cy;
|
||||||
RECT rect;
|
RECT rect;
|
||||||
PWND pWnd = ValidateHwndNoErr(menu->hWnd);
|
PWND pWnd = ValidateHwndNoErr(menu->hWnd);
|
||||||
|
|
||||||
if (!IntGetWindowRect(pWnd, &rect)) return NULL;
|
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)
|
if (pWnd->ExStyle & WS_EX_LAYOUTRTL)
|
||||||
pt.x = rect.right - 1 - pt.x;
|
pt.x = rect.right - 1 - pt.x;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue