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 /src/evdev_axes.c | |
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.
Diffstat (limited to 'src/evdev_axes.c')
-rw-r--r-- | src/evdev_axes.c | 10 |
1 files changed, 9 insertions, 1 deletions
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; } |