Commit a5e92410 authored by Mikołaj Zalewski's avatar Mikołaj Zalewski Committed by Alexandre Julliard

wineconsole: WM_RBUTTONDOWN lParam is in client coordinates not window coordinates.

parent bf42a341
......@@ -1175,12 +1175,14 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
case WM_RBUTTONDOWN:
if ((wParam & (MK_CONTROL|MK_SHIFT)) == data->curcfg.menu_mask)
{
RECT r;
POINT pt;
GetWindowRect(hWnd, &r);
pt.x = LOWORD(lParam);
pt.y = HIWORD(lParam);
ClientToScreen(hWnd, &pt);
WCUSER_SetMenuDetails(data, PRIVATE(data)->hPopMenu);
TrackPopupMenu(PRIVATE(data)->hPopMenu, TPM_LEFTALIGN|TPM_TOPALIGN,
r.left + LOWORD(lParam), r.top + HIWORD(lParam), 0, hWnd, NULL);
pt.x, pt.y, 0, hWnd, NULL);
}
else
{
......
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