diff options
author | Daniel Stone <daniel@fooishbar.org> | 2006-10-25 02:22:46 +0300 |
---|---|---|
committer | Daniel Stone <daniels@endtroducing.fooishbar.org> | 2006-10-25 02:22:46 +0300 |
commit | 036b457c1b3f7d2d174da890cb8598d907181f8e (patch) | |
tree | ec9927af299ff516969553b29278d59581b0418f | |
parent | Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/driver... (diff) | |
download | xf86-input-evdev-036b457c1b3f7d2d174da890cb8598d907181f8e.tar.gz xf86-input-evdev-036b457c1b3f7d2d174da890cb8598d907181f8e.tar.bz2 xf86-input-evdev-036b457c1b3f7d2d174da890cb8598d907181f8e.zip |
support new DIX motion history API
Use the DIX motion history if we have ABI version 1 or higher.
-rw-r--r-- | src/evdev.c | 2 | ||||
-rw-r--r-- | src/evdev_axes.c | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c index f2d61f6..1bcaef8 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -273,7 +273,9 @@ EvdevNew(evdevDriverPtr driver, evdevDevicePtr device) pInfo->device_control = EvdevProc; pInfo->read_input = EvdevReadInput; pInfo->switch_mode = EvdevSwitchMode; +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 pInfo->motion_history_proc = xf86GetMotionEvents; +#endif pInfo->conf_idev = driver->dev; pInfo->private = device; diff --git a/src/evdev_axes.c b/src/evdev_axes.c index 6879ab1..9d2ef20 100644 --- a/src/evdev_axes.c +++ b/src/evdev_axes.c @@ -672,8 +672,14 @@ EvdevAxesInit (DeviceIntPtr device) return Success; if (!InitValuatorClassDeviceStruct(device, axes, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 1 + GetMotionHistory, + GetMotionHistorySize(), +#else miPointerGetMotionEvents, - miPointerGetMotionBufferSize(), 0)) + miPointerGetMotionBufferSize(), +#endif + 0)) return !Success; for (i = 0; i < axes; i++) { @@ -684,7 +690,9 @@ EvdevAxesInit (DeviceIntPtr device) if (!InitPtrFeedbackClassDeviceStruct(device, EvdevPtrCtrlProc)) return !Success; +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 xf86MotionHistoryAllocate (pInfo); +#endif return Success; } |