Commit 98128a65 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

user32: Use GetClientRect in EDIT_WM_ContextMenu.

parent c0b62eb5
......@@ -3328,11 +3328,16 @@ static void EDIT_WM_ContextMenu(EDITSTATE *es, INT x, INT y)
if (x == -1 && y == -1) /* passed via VK_APPS press/release */
{
POINT pt;
RECT rc;
/* Windows places the menu at the edit's center in this case */
WIN_GetRectangles( es->hwndSelf, COORDS_SCREEN, NULL, &rc );
x = rc.left + (rc.right - rc.left) / 2;
y = rc.top + (rc.bottom - rc.top) / 2;
GetClientRect( es->hwndSelf, &rc );
pt.x = rc.right / 2;
pt.y = rc.bottom / 2;
ClientToScreen( es->hwndSelf, &pt );
x = pt.x;
y = pt.y;
}
if (!(es->flags & EF_FOCUSED))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment