From d8e1d4d1f4eeeb87c573810c0f0d141fe180bb01 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 28 Aug 2007 17:39:11 -0700 Subject: Port to new motion history/InitPointerDeviceStruct ABI (Copied from daniels' fix to xf86-input-mouse) --- src/vmmouse.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/vmmouse.c b/src/vmmouse.c index 2c2683b..5acf2f2 100644 --- a/src/vmmouse.c +++ b/src/vmmouse.c @@ -323,7 +323,9 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags) pInfo->flags = XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS; pInfo->device_control = VMMouseDeviceControl; pInfo->read_input = VMMouseReadInput; +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 pInfo->motion_history_proc = xf86GetMotionEvents; +#endif pInfo->control_proc = VMMouseControlProc; pInfo->close_proc = VMMouseCloseProc; pInfo->switch_mode = VMMouseSwitchMode; @@ -753,8 +755,18 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode) InitPointerDeviceStruct((DevicePtr)device, map, min(pMse->buttons, MSE_MAXBUTTONS), - miPointerGetMotionEvents, pMse->Ctrl, - miPointerGetMotionBufferSize()); +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 + miPointerGetMotionEvents, +#else + GetMotionHistory, +#endif + pMse->Ctrl, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 + miPointerGetMotionBufferSize() +#else + GetMotionHistorySize(), 2 +#endif + ); /* X valuator */ xf86InitValuatorAxisStruct(device, 0, 0, -1, 1, 0, 1); @@ -762,7 +774,9 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode) /* Y valuator */ xf86InitValuatorAxisStruct(device, 1, 0, -1, 1, 0, 1); xf86InitValuatorDefaults(device, 1); +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 xf86MotionHistoryAllocate(pInfo); +#endif xf86Msg(X_INFO, "VMWARE(0): VMMOUSE DEVICE_INIT\n"); #ifdef EXTMOUSEDEBUG -- cgit v1.2.3