Mikołaj Zalewski : wineconsole: WM_RBUTTONDOWN lParam is in client coordinates not window coordinates.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Oct 20 08:00:37 CDT 2006
Module: wine
Branch: master
Commit: a5e92410da33558e516f090f8ffafce6ae8aab7e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a5e92410da33558e516f090f8ffafce6ae8aab7e
Author: Mikołaj Zalewski <mikolaj at zalewski.pl>
Date: Thu Oct 19 19:38:01 2006 +0200
wineconsole: WM_RBUTTONDOWN lParam is in client coordinates not window coordinates.
---
programs/wineconsole/user.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/programs/wineconsole/user.c b/programs/wineconsole/user.c
index 7477ce4..fbb1b98 100644
--- a/programs/wineconsole/user.c
+++ b/programs/wineconsole/user.c
@@ -1175,12 +1175,14 @@ static LRESULT CALLBACK WCUSER_Proc(HWND
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
{
More information about the wine-cvs
mailing list