summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--src/vmmouse.c8
2 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a57851f..639ba74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,6 +86,9 @@ PKG_CHECK_EXISTS([xorg-server >= 1.3.99.0 xorg-server <= 1.4.0.90],
[AC_DEFINE([CALL_CONVERSION_PROC], 1,
[Call conversion_proc from within the driver, as
Xserver doesn't])])
+PKG_CHECK_EXISTS([xorg-server > 1.4.0.90],
+ [AC_DEFINE([ABS_VALUATOR_AXES], 1,
+ [Define absolute valuator axes])])
CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src'
AC_SUBST([CFLAGS])
diff --git a/src/vmmouse.c b/src/vmmouse.c
index bc0cb87..beeed87 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -807,10 +807,18 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode)
);
/* X valuator */
+#ifdef ABS_VALUATOR_AXES
+ xf86InitValuatorAxisStruct(device, 0, 0, 65535, 10000, 0, 10000);
+#else
xf86InitValuatorAxisStruct(device, 0, 0, -1, 1, 0, 1);
+#endif
xf86InitValuatorDefaults(device, 0);
/* Y valuator */
+#ifdef ABS_VALUATOR_AXES
+ xf86InitValuatorAxisStruct(device, 1, 0, 65535, 10000, 0, 10000);
+#else
xf86InitValuatorAxisStruct(device, 1, 0, -1, 1, 0, 1);
+#endif
xf86InitValuatorDefaults(device, 1);
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
xf86MotionHistoryAllocate(pInfo);