summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/Makefile.am9
-rw-r--r--conf/wacom-preprobe.fdi17
-rw-r--r--configure.ac15
3 files changed, 39 insertions, 2 deletions
diff --git a/conf/Makefile.am b/conf/Makefile.am
index f7abdd0..8e8a99f 100644
--- a/conf/Makefile.am
+++ b/conf/Makefile.am
@@ -3,8 +3,13 @@ CLEANFILES=
if HAS_XORG_CONF_DIR
dist_config_DATA = 70-wacom.conf
else
-fdidir = $(datadir)/hal/fdi/policy/20thirdparty
-dist_fdi_DATA = wacom.fdi
+fdipolicydir = $(datadir)/hal/fdi/policy/20thirdparty
+dist_fdipolicy_DATA = wacom.fdi
+endif
+
+if USE_HAL_FDI_PREPROBE_QUIRK
+fdipreprobedir = $(datadir)/hal/fdi/preprobe/20thirdparty
+dist_fdipreprobe_DATA = wacom-preprobe.fdi
endif
if HAVE_SYSTEMD_UNIT_DIR
diff --git a/conf/wacom-preprobe.fdi b/conf/wacom-preprobe.fdi
new file mode 100644
index 0000000..bcf860a
--- /dev/null
+++ b/conf/wacom-preprobe.fdi
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deviceinfo version="0.2">
+ <device>
+
+ <!-- Some Wacom devices (e.g. Cintiq Pro) have an EV_SW event which is
+ unsupported by HAL. To prevent the input prober from failing
+ on this event (hal/hald/linux/probing/probe-input.c:79) we
+ should pretend that it doesn't exist. -->
+ <match key="info.capabilities" contains="button">
+ <match key="info.product" contains_outof="Wacom;WACOM">
+ <merge key="button.has_state" type="bool">false</merge>
+ </match>
+ </match>
+
+ </device>
+</deviceinfo>
diff --git a/configure.ac b/configure.ac
index b17cbe0..6bc7d84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,6 +107,21 @@ AC_ARG_WITH([xorg-conf-dir],
AC_SUBST(configdir)
AM_CONDITIONAL(HAS_XORG_CONF_DIR, [test "x$configdir" != "x"])
+AC_ARG_ENABLE(hal-fdi-preprobe-quirk, AS_HELP_STRING([--enable-hal-fdi-preprobe-quirk],
+ [Install HAL workaround for devices with unsupported EV_SW events (default: auto)]),
+ [USE_HAL_FDI_PREPROBE_QUIRK=$enableval],
+ [USE_HAL_FDI_PREPROBE_QUIRK=auto])
+if test "x$USE_HAL_FDI_PREPROBE_QUIRK" = xauto ; then
+ AC_CHECK_PROG([LSHAL], [lshal], [yes], [no])
+ AC_CHECK_PROG([HAL_SET_PROPERTY], [hal-set-property], [yes], [no])
+ AS_IF([test "x$LSHAL" = "xyes" -a "x$HAL_SET_PROPERTY" = "xyes"],
+ [USE_HAL_FDI_PREPROBE_QUIRK=yes],
+ [USE_HAL_FDI_PREPROBE_QUIRK=no])
+fi
+AC_MSG_CHECKING([if HAL preprobe quirk should be installed])
+AC_MSG_RESULT($USE_HAL_FDI_PREPROBE_QUIRK)
+AM_CONDITIONAL(USE_HAL_FDI_PREPROBE_QUIRK, [test "x$USE_HAL_FDI_PREPROBE_QUIRK" = xyes])
+
AC_ARG_ENABLE(fuzz-interface, AS_HELP_STRING([--enable-fuzz-interface],
[Enable xsetwacom to take NUL-separated commands from stdin (default: no)]),
[FUZZINTERFACE=$enableval],