diff options
author | marha <marha@users.sourceforge.net> | 2009-09-09 15:19:40 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-09 15:19:40 +0000 |
commit | e978fab10babba27885fe6b8a3f8dd72fecbc792 (patch) | |
tree | 755b19ad0256af3b44bf79c021c132288a396529 /xorg-server/hw/xwin/winwin32rootlesswndproc.c | |
parent | ce016335ab8ff2413bb82de6f74b2b96f746d07b (diff) | |
download | vcxsrv-e978fab10babba27885fe6b8a3f8dd72fecbc792.tar.gz vcxsrv-e978fab10babba27885fe6b8a3f8dd72fecbc792.tar.bz2 vcxsrv-e978fab10babba27885fe6b8a3f8dd72fecbc792.zip |
Synchronised with released branch.
Diffstat (limited to 'xorg-server/hw/xwin/winwin32rootlesswndproc.c')
-rw-r--r-- | xorg-server/hw/xwin/winwin32rootlesswndproc.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/xorg-server/hw/xwin/winwin32rootlesswndproc.c b/xorg-server/hw/xwin/winwin32rootlesswndproc.c index 00627d218..4d7afee42 100644 --- a/xorg-server/hw/xwin/winwin32rootlesswndproc.c +++ b/xorg-server/hw/xwin/winwin32rootlesswndproc.c @@ -522,7 +522,16 @@ winMWExtWMWindowProc (HWND hwnd, UINT message, #if CYGMULTIWINDOW_DEBUG && 0 winDebug ("winMWExtWMWindowProc - WM_MOUSEMOVE\n"); #endif - winGetPtMouse(hwnd,lParam,&ptMouse); + /* Unpack the client area mouse coordinates */ + ptMouse.x = GET_X_LPARAM(lParam); + ptMouse.y = GET_Y_LPARAM(lParam); + + /* Translate the client area mouse coordinates to screen coordinates */ + ClientToScreen (hwnd, &ptMouse); + + /* Screen Coords from (-X, -Y) -> Root Window (0, 0) */ + ptMouse.x -= GetSystemMetrics (SM_XVIRTUALSCREEN); + ptMouse.y -= GetSystemMetrics (SM_YVIRTUALSCREEN); /* We can't do anything without privates */ if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput) @@ -622,7 +631,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message, if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput) break; SetCapture (hwnd); - return winMouseButtonsHandle (pScreen, DeviceeButtonPress, Button1, wParam, hwnd, lParam); + return winMouseButtonsHandle (pScreen, ButtonPress, Button1, wParam); case WM_LBUTTONUP: #if CYGMULTIWINDOW_DEBUG @@ -631,7 +640,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message, if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput) break; ReleaseCapture (); - return winMouseButtonsHandle (pScreen, DeviceButtonRelease, Button1, wParam, hwnd, lParam); + return winMouseButtonsHandle (pScreen, ButtonRelease, Button1, wParam); case WM_MBUTTONDBLCLK: case WM_MBUTTONDOWN: @@ -641,7 +650,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message, if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput) break; SetCapture (hwnd); - return winMouseButtonsHandle (pScreen, DeviceButtonPress, Button2, wParam, hwnd, lParam); + return winMouseButtonsHandle (pScreen, ButtonPress, Button2, wParam); case WM_MBUTTONUP: #if CYGMULTIWINDOW_DEBUG @@ -650,7 +659,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message, if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput) break; ReleaseCapture (); - return winMouseButtonsHandle (pScreen, DeviceButtonRelease, Button2, wParam, hwnd, lParam); + return winMouseButtonsHandle (pScreen, ButtonRelease, Button2, wParam); case WM_RBUTTONDBLCLK: case WM_RBUTTONDOWN: @@ -660,7 +669,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message, if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput) break; SetCapture (hwnd); - return winMouseButtonsHandle (pScreen, DeviceButtonPress, Button3, wParam, hwnd, lParam); + return winMouseButtonsHandle (pScreen, ButtonPress, Button3, wParam); case WM_RBUTTONUP: #if CYGMULTIWINDOW_DEBUG @@ -669,19 +678,19 @@ winMWExtWMWindowProc (HWND hwnd, UINT message, if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput) break; ReleaseCapture (); - return winMouseButtonsHandle (pScreen, DeviceButtonRelease, Button3, wParam, hwnd, lParam); + return winMouseButtonsHandle (pScreen, ButtonRelease, Button3, wParam); case WM_XBUTTONDBLCLK: case WM_XBUTTONDOWN: if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput) break; SetCapture (hwnd); - return winMouseButtonsHandle (pScreen, DeviceButtonPress, HIWORD(wParam) + 5, wParam, hwnd, lParam); + return winMouseButtonsHandle (pScreen, ButtonPress, HIWORD(wParam) + 5, wParam); case WM_XBUTTONUP: if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput) break; ReleaseCapture (); - return winMouseButtonsHandle (pScreen, DeviceButtonRelease, HIWORD(wParam) + 5, wParam, hwnd, lParam); + return winMouseButtonsHandle (pScreen, ButtonRelease, HIWORD(wParam) + 5, wParam); case WM_MOUSEWHEEL: #if CYGMULTIWINDOW_DEBUG |