|
From: <kr_...@us...> - 2003-08-17 16:44:00
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv24769/src/cbits/Win32
Modified Files:
Window.c
Log Message:
Translate screen coordinates to local coordinates in the WM_CONTEXTMENU handler
Index: Window.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** Window.c 15 Aug 2003 21:24:54 -0000 1.37
--- Window.c 17 Aug 2003 16:43:57 -0000 1.38
***************
*** 485,492 ****
if (pData->enabled)
{
! POINT pos;
! pos.x = pData->Origin.x+GET_X_LPARAM(lParam);
! pos.y = pData->Origin.y+GET_Y_LPARAM(lParam);
handleWindowContextMenu(hWnd,pos.x,pos.y,GetModifiers());
--- 485,498 ----
if (pData->enabled)
{
! POINT pos;
! pos.x = GET_X_LPARAM(lParam);
! pos.y = GET_Y_LPARAM(lParam);
!
! if (pos.x != 1 || pos.y != 1)
! ScreenToClient(hWnd, &pos);
!
! pos.x += pData->Origin.x;
! pos.y += pData->Origin.y;
handleWindowContextMenu(hWnd,pos.x,pos.y,GetModifiers());
|