summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPovilas Kanapickas <povilas@radix.lt>2021-09-15 19:45:49 +0300
committerPeter Hutterer <peter.hutterer@who-t.net>2021-09-16 11:23:33 +1000
commit8588a19f63f9c17f66a83850e20955450c3098a2 (patch)
treea0d82f71c588896ebb14f6722f7ebcb80d5f9fc1
parentbeb94333e1450006942a7f0ee38bc2a2f5719238 (diff)
downloadxorg-driver-xf86-input-libinput-8588a19f63f9c17f66a83850e20955450c3098a2.tar.gz
Require inputproto 2.4 to build the gesture support
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
-rw-r--r--configure.ac3
-rw-r--r--src/xf86libinput.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f747a3d..562c9c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,9 @@ XORG_DEFAULT_OPTIONS
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.19] xproto [inputproto >= 2.2])
PKG_CHECK_MODULES(LIBINPUT, [libinput >= 1.11.0])
+PKG_CHECK_MODULES(INPUTPROTO24, [inputproto >= 2.3.99.1],
+ [AC_DEFINE(HAVE_INPUTPROTO24, [1], [inputproto 2.4 is available])])
+
OLD_LIBS=$LIBS
OLD_CFLAGS=$CFLAGS
LIBS="$LIBS $LIBINPUT_LIBS"
diff --git a/src/xf86libinput.c b/src/xf86libinput.c
index 0cb0c3c..243ac79 100644
--- a/src/xf86libinput.c
+++ b/src/xf86libinput.c
@@ -80,9 +80,11 @@
#define CAP_TABLET_PAD 0x20
#define CAP_GESTURE 0x40
+#if HAVE_INPUTPROTO24
#if ABI_XINPUT_VERSION >= SET_ABI_VERSION(24, 4)
#define HAS_GESTURES
#endif
+#endif
struct xf86libinput_driver {
struct libinput *libinput;