summaryrefslogtreecommitdiff
path: root/src/vmmouse.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2007-08-28 17:39:11 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-08-28 17:39:11 -0700
commitd8e1d4d1f4eeeb87c573810c0f0d141fe180bb01 (patch)
tree86bddcde85ce6271b7d6e4a32df2494c9c973d82 /src/vmmouse.c
parent5a4e1fe50b1a38cfc489eff49f5a729bd726cd23 (diff)
Port to new motion history/InitPointerDeviceStruct ABI
(Copied from daniels' fix to xf86-input-mouse)
Diffstat (limited to 'src/vmmouse.c')
-rw-r--r--src/vmmouse.c18
1 files changed, 16 insertions, 2 deletions
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