From 064445364b4775b25ba49c2250b22b169f291147 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 29 Jan 2015 11:25:26 +1000 Subject: Support the new Lenovo X1 Carbon 3rd trackpoint buttons This device has the trackpoint buttons wired up to the touchpad to send BTN_0, BTN_1 and BTN_2 for left, right, middle. This conflicts with previous touchpads that used those event codes for dedicated scroll buttons. Add an option HasTrackpointButtons that can be set via a xorg.conf.d snippets. This option is not intended as a user-set option, rather we expect distributions to ship some conglomerate of udev/hal rules with xorg.conf snippets that take effect. If the option is set, we look at the three affected buttons at the beginning of HandleState and send button events immediately for them. The HW state is reset to neutral and other processing continues. This saves us from having to synchronize these buttons with software buttons (also present on this device), tapping, etc. Since the buttons are physically different and (mentally) associated with the trackpoint device we also don't need to worry about having finger motion event correctly synced up with the button presses - it's acceptable to send the presses before the motion events. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Tested-by: Benjamin Tissoires --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 0a2bfb6..2844da2 100644 --- a/configure.ac +++ b/configure.ac @@ -135,6 +135,16 @@ AM_CONDITIONAL([BUILD_EVENTCOMM], [test "x${BUILD_EVENTCOMM}" = "xyes"]) AM_CONDITIONAL([BUILD_PSMCOMM], [test "x${BUILD_PSMCOMM}" = "xyes"]) AM_CONDITIONAL([BUILD_PS2COMM], [test "x${BUILD_PS2COMM}" = "xyes"]) +AC_ARG_WITH(udev-rules-dir, + AS_HELP_STRING([--with-udev-rules-dir=DIR], + [Directory where udev expects its rules files + [[default=$libdir/udev/rules.d]]]), + [udevdir="$withval"], + [udevdir="$libdir/udev/rules.d"]) +UDEV_RULES_DIR=${udevdir} +AC_SUBST(UDEV_RULES_DIR) +AM_CONDITIONAL(HAVE_UDEV_RULES_DIR, [test "x$UDEV_RULES_DIR" != "xno"]) + # ----------------------------------------------------------------------------- # Dependencies for synclient and syndaemon # ----------------------------------------------------------------------------- -- cgit v1.2.3