diff options
Diffstat (limited to 'xorg-server/hw/xwin/winwin32rootlesswndproc.c')
-rw-r--r-- | xorg-server/hw/xwin/winwin32rootlesswndproc.c | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/xorg-server/hw/xwin/winwin32rootlesswndproc.c b/xorg-server/hw/xwin/winwin32rootlesswndproc.c index 32db6621b..a5315096c 100644 --- a/xorg-server/hw/xwin/winwin32rootlesswndproc.c +++ b/xorg-server/hw/xwin/winwin32rootlesswndproc.c @@ -35,7 +35,7 @@ #include "win.h" #include <winuser.h> #define _WINDOWSWM_SERVER_ -#include "windowswmstr.h" +#include <X11/extensions/windowswmstr.h> #include "dixevents.h" #include "propertyst.h" #include <X11/Xatom.h> @@ -48,7 +48,6 @@ * Constant defines */ -#define MOUSE_POLLING_INTERVAL 500 #define MOUSE_ACTIVATE_DEFAULT TRUE #define RAISE_ON_CLICK_DEFAULT FALSE @@ -523,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) @@ -571,9 +561,9 @@ winMWExtWMWindowProc (HWND hwnd, UINT message, } /* Deliver absolute cursor position to X Server */ - miPointerAbsoluteCursor (ptMouse.x - pScreenInfo->dwXOffset, - ptMouse.y - pScreenInfo->dwYOffset, - g_c32LastInputEventTime = GetTickCount ()); + winEnqueueMotion(ptMouse.x - pScreenInfo->dwXOffset, + ptMouse.y - pScreenInfo->dwYOffset); + return 0; case WM_NCMOUSEMOVE: @@ -632,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 @@ -641,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: @@ -651,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 @@ -660,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: @@ -670,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 @@ -679,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 |