aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winwin32rootlesswndproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winwin32rootlesswndproc.c')
-rw-r--r--xorg-server/hw/xwin/winwin32rootlesswndproc.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/xorg-server/hw/xwin/winwin32rootlesswndproc.c b/xorg-server/hw/xwin/winwin32rootlesswndproc.c
index e624ded36..a5315096c 100644
--- a/xorg-server/hw/xwin/winwin32rootlesswndproc.c
+++ b/xorg-server/hw/xwin/winwin32rootlesswndproc.c
@@ -522,16 +522,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
#if CYGMULTIWINDOW_DEBUG && 0
winDebug ("winMWExtWMWindowProc - WM_MOUSEMOVE\n");
#endif
- /* 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);
+ winGetPtMouse(hwnd,lParam,&ptMouse);
/* We can't do anything without privates */
if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
@@ -631,7 +622,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
break;
SetCapture (hwnd);
- return winMouseButtonsHandle (pScreen, ButtonPress, Button1, wParam);
+ return winMouseButtonsHandle (pScreen, DeviceeButtonPress, Button1, wParam, hwnd, lParam);
case WM_LBUTTONUP:
#if CYGMULTIWINDOW_DEBUG
@@ -640,7 +631,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
break;
ReleaseCapture ();
- return winMouseButtonsHandle (pScreen, ButtonRelease, Button1, wParam);
+ return winMouseButtonsHandle (pScreen, DeviceButtonRelease, Button1, wParam, hwnd, lParam);
case WM_MBUTTONDBLCLK:
case WM_MBUTTONDOWN:
@@ -650,7 +641,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
break;
SetCapture (hwnd);
- return winMouseButtonsHandle (pScreen, ButtonPress, Button2, wParam);
+ return winMouseButtonsHandle (pScreen, DeviceButtonPress, Button2, wParam, hwnd, lParam);
case WM_MBUTTONUP:
#if CYGMULTIWINDOW_DEBUG
@@ -659,7 +650,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
break;
ReleaseCapture ();
- return winMouseButtonsHandle (pScreen, ButtonRelease, Button2, wParam);
+ return winMouseButtonsHandle (pScreen, DeviceButtonRelease, Button2, wParam, hwnd, lParam);
case WM_RBUTTONDBLCLK:
case WM_RBUTTONDOWN:
@@ -669,7 +660,7 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
break;
SetCapture (hwnd);
- return winMouseButtonsHandle (pScreen, ButtonPress, Button3, wParam);
+ return winMouseButtonsHandle (pScreen, DeviceButtonPress, Button3, wParam, hwnd, lParam);
case WM_RBUTTONUP:
#if CYGMULTIWINDOW_DEBUG
@@ -678,19 +669,19 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
break;
ReleaseCapture ();
- return winMouseButtonsHandle (pScreen, ButtonRelease, Button3, wParam);
+ return winMouseButtonsHandle (pScreen, DeviceButtonRelease, Button3, wParam, hwnd, lParam);
case WM_XBUTTONDBLCLK:
case WM_XBUTTONDOWN:
if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
break;
SetCapture (hwnd);
- return winMouseButtonsHandle (pScreen, ButtonPress, HIWORD(wParam) + 5, wParam);
+ return winMouseButtonsHandle (pScreen, DeviceButtonPress, HIWORD(wParam) + 5, wParam, hwnd, lParam);
case WM_XBUTTONUP:
if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput)
break;
ReleaseCapture ();
- return winMouseButtonsHandle (pScreen, ButtonRelease, HIWORD(wParam) + 5, wParam);
+ return winMouseButtonsHandle (pScreen, DeviceButtonRelease, HIWORD(wParam) + 5, wParam, hwnd, lParam);
case WM_MOUSEWHEEL:
#if CYGMULTIWINDOW_DEBUG