mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
wineconsole: WM_RBUTTONDOWN lParam is in client coordinates not window coordinates.
This commit is contained in:
parent
bf42a34142
commit
a5e92410da
1 changed files with 5 additions and 3 deletions
|
@ -1175,12 +1175,14 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
case WM_RBUTTONDOWN:
|
case WM_RBUTTONDOWN:
|
||||||
if ((wParam & (MK_CONTROL|MK_SHIFT)) == data->curcfg.menu_mask)
|
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);
|
WCUSER_SetMenuDetails(data, PRIVATE(data)->hPopMenu);
|
||||||
TrackPopupMenu(PRIVATE(data)->hPopMenu, TPM_LEFTALIGN|TPM_TOPALIGN,
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue