diff -Nru xf86-input-wacom-0.33.0/ChangeLog xf86-input-wacom-0.34.0/ChangeLog --- xf86-input-wacom-0.33.0/ChangeLog 2016-05-13 23:10:59.000000000 +0000 +++ xf86-input-wacom-0.34.0/ChangeLog 2016-12-05 22:00:06.000000000 +0000 @@ -1,3 +1,215 @@ +commit 6ff54b3020268f7baf8f1e748a6e278126472c58 +Author: Jason Gerecke +Date: Mon Dec 5 11:14:08 2016 -0800 + + wacom 0.34.0 + + Signed-off-by: Jason Gerecke + +commit 3ad7e9e6bfce19f630fc2902dfcceb53b912ae1f +Author: Jason Gerecke +Date: Fri Nov 18 15:21:58 2016 -0800 + + wacom 0.33.99.1 + + Signed-off-by: Jason Gerecke + +commit 051a406583a93cad2ec34a3fb03885237cd1a23e +Author: Jason Gerecke +Date: Tue Nov 1 09:02:21 2016 -0700 + + Add missing newline to log message + + Signed-off-by: Jason Gerecke + Reviewed-by: Peter Hutterer + +commit 5bd8f70b9b3d6266e4c8e3c0ffd408d2c2e3c365 +Author: Jason Gerecke +Date: Fri Nov 11 08:43:31 2016 -0800 + + Further reduce arbitration priority of cursor devices + + Cursor (puck) devices are typically left on the sensor and can emit + spurious events that can potentially cause the driver to steal "active" + status from another tool. In the past we'd only considered the case where + the active tool was a touch but it is reasonable to extend this logic to + other tool types. If a cursor emits a spurious event in the middle of a + pen dragging, for example, the drag will momentarily stop as the pen is + temporarily sent out of prox -- with potentially disasterous results. + Additionally, when the pen "returns" in prox on the next event, any + currently-applied pressure will be taken as the preload and result in + incorrect pressure scaling until the pen is removed from contact. + + This commit removes the "IsTouch" conditions from the handling of + spurious cursor events in check_arbitrated_control. The result is that a + cursor will not be granted "active" status in preference to any other + tool (and will drop "active" status if gained after 100ms and while + no buttons are pressed). + + Signed-off-by: Jason Gerecke + Reviewed-by: Peter Hutterer + +commit 9433019e82b6e3ac5c2ca21ae4fabbb8a6756e38 +Author: Jason Gerecke +Date: Tue Nov 1 10:55:58 2016 -0700 + + Allow cursor devices to maintain "active" status while buttons are down + + Cursor (puck) tools tend to be left on the sensor, preventing us from + being able to rely solely on proximity information to determine if + they are being actively used. In the past we've used the amount of time + since the last event as an indicator of activity and allowed other + devices to grab control of the pointer if more than 100 milliseconds had + elapsed since the cursor's last event. Although this seems to work well, + there is another indicator of activity which should not be ignored: + button state. If a user is pressing a button on their cursor tool, it + should be considered active even if the 100ms timeout has been exceeded. + Not doing so could potentially allow another tool to grab "active" + status and have our driver send a button-up message and stop an in- + progress drag. + + Signed-off-by: Jason Gerecke + Reviewed-by: Peter Hutterer + +commit 5f5479a4f195e11a7bb708019afb299cf7a29741 +Author: Jason Gerecke +Date: Mon Oct 31 18:14:24 2016 -0700 + + Lazily allocate pressure curve table + + Now that the pressure curve contains 65K points it takes up quite a bit + of memory, especially considering that the pressure curve may not need + to exist for some devices (e.g. pads) and may just be the default linear + curve even for those where it should exist. To reduce the amount of + memory used, we now lazily allocate space for the pressure curve tables + only when they are set to a non-default curve. + + Signed-off-by: Jason Gerecke + Reviewed-by: Peter Hutterer + +commit 3e56ce4429d9053da3b873f8717b830e3bdc5ea4 +Author: Jason Gerecke +Date: Tue Jun 14 10:42:29 2016 -0700 + + Increase full-scale pressure range from 0..2047 to 0..65535 + + The driver has historically normalized the pressure range of all kernel + devices to 0..2047 rather than using their native range to keep things + like the application of the pressure curve simple. Pens that report more + than 2048 pressure levels are also normalized down to this range though, + reducing their precision. In order to accomodate the new 8K pen (and any + future pens with even higher precision), this patch bumps up the full- + scale range to be 0..65535. This number was chosen both because it far + exceeds anything currently known about, and also because it matches the + normalization range used over the wire by the Wayland tablet protocol. + + Note that the WACOM_PROP_PRESSURE_THRESHOLD value has been tied to the + normalized (2048-level) pressure range for some time, meaning that we + cannot simply change the range without causing a change in the perceived + threshold for users. To ensure compatibility, the value is interpreted + as a fraction of 2048 and then scaled to the actual normalization range. + + Signed-off-by: Jason Gerecke + Reviewed-by: Peter Hutterer + +commit 54c125b28479ff88903647c2dce1d49daa3402df +Author: Jason Gerecke +Date: Fri Oct 7 09:20:34 2016 -0700 + + Read TouchRing axis range from kernel instead of hardcoding + + The TouchRing on the MobileStudio Pro has a range of only 0-35 instead + of 0-17 like prior devices. Because we hardcode an assumed range, the + driver mistakenly believes the jump from 35 to 0 (or 0 to 35, depending + on direction) when the user completes a revolution is actually caused + by the user reversing their finger direction. By reading the range from + the kernel, we can avoid this situation. + + Note that the ABS_WHEEL axis is also used by (legacy) combined pen/pad + devices with a range corresponding to the puck fingerwheel. We need to + be careful to not read the value in these cases since it would lead to + erroneous behavior in existing setups. Devices with a range range + different from 0-71 will hopefully not be widely used on kernels prior + to 3.17 where pen and pad were split into seperate devices since there + is no way (short of peeking at the VID:PID or name) to have them work + correctly in the combined case. + + Signed-off-by: Jason Gerecke + Reviewed-by: Peter Hutterer + Reviewed-by: Ping Cheng + +commit b61d1711e9a2d6c647341e8ea0119521fd200d62 +Author: Peter Hutterer +Date: Thu Aug 11 13:47:35 2016 +1000 + + Make DEVICE_CLOSE a noop + + The server guarantees that DEVICE_OFF is called for any previously enabled + device, so we don't really have anything to do here. And since the input + thread addition to the server we can't safely call xf86RemoveEnabledDevice() + twice for the same device. + + Signed-off-by: Peter Hutterer + Tested-by: Ping Cheng + +commit bae283c8c91f6e064e727887da79e91e5c7c5f19 +Author: Peter Hutterer +Date: Tue Aug 9 15:39:46 2016 +1000 + + Lock the input thread while creating a new device + + Don't process events while we're creating a new device so we don't start + processing events halfway between the new device being set up. + + Signed-off-by: Peter Hutterer + Tested-by: Ping Cheng + +commit ce912d8bba63faabe5d60a9f467c714511a835f7 +Author: Peter Hutterer +Date: Thu Jun 2 09:23:57 2016 +1000 + + Handle the input ABI 23 - removal of xf86BlockSIGIO + + Input is now handled in a separate thread in the server when a device is added + through xf86AddEnabledDevice(). Previously that was in a sigio handler and we + have a bunch of workarounds to avoid calling things from within the signal + handler. With the new API these aren't needed, so split those callbacks and + call them directly where needed. + + Signed-off-by: Peter Hutterer + Tested-by: Ping Cheng + +commit 97d86e150c23108b4dbc99dbb8338aec60eea39c +Author: Ping Cheng +Date: Fri Aug 5 18:27:55 2016 -0700 + + xsetwacom: refer KeySyms defined by keysymdef.h in man page + + xsetwacom accepts keys in X11 KeySyms format. To make the interface + user friendly, we mapped a set of modifiers to aliases that can be + recognized by most users. But, there are a few less recognizable or + confusing keys/modifiers left. This patch tells users where to find + the X11 KeySyms they are looking for. + + Signed-off-by: Ping Cheng + Signed-off-by: Peter Hutterer + +commit d54db63e716317bb336ddf444ab8034353913db7 +Author: Ping Cheng +Date: Thu Aug 4 10:49:52 2016 -0700 + + xsetwacom: Add return to special key alias list + + return is a popular key assignment which was not added to the + special key list. Although Return would work since it is the + key name, we add return anyway to make users happy. + + Enter/enter for KP_Enter could have achieved the same purpose. + But, it confuses users (and some developers ;). + + Signed-off-by: Ping Cheng + Tested-by: Kelly Price + commit b16b68a9302ce19226d78eed0e1fcb530f372506 Author: Jason Gerecke Date: Fri May 13 15:32:27 2016 -0700 @@ -5842,7 +6054,7 @@ "%zd" in order to avoid the format string warning at compile time: xsetwacom.c:787:2: warning: format '%d' expects argument of type 'int', - but argument 2 has type 'long unsigned int' [-Wformat] + but argument 2 has type 'long unsigned int' [-Wformat] Signed-off-by: Eduard Hasenleithner Signed-off-by: Peter Hutterer @@ -6612,7 +6824,7 @@ Conflicts: - src/wcmXCommand.c + src/wcmXCommand.c Reported-by: Andrzej Giniewicz Signed-off-by: Peter Hutterer @@ -7403,7 +7615,7 @@ Conflicts: - src/wcmXCommand.c + src/wcmXCommand.c Reported-by: Michal Suchanek Signed-off-by: Peter Hutterer @@ -10939,10 +11151,10 @@ The three fields (name, id and type) are separated by tab characters to ease parsing. Example output is: - Wacom Intuos4 6x9 eraser id: 12 type: ERASER - Wacom Intuos4 6x9 cursor id: 13 type: CURSOR - Wacom Intuos4 6x9 pad id: 14 type: PAD - Wacom Intuos4 6x9 stylus id: 15 type: STYLUS + Wacom Intuos4 6x9 eraser id: 12 type: ERASER + Wacom Intuos4 6x9 cursor id: 13 type: CURSOR + Wacom Intuos4 6x9 pad id: 14 type: PAD + Wacom Intuos4 6x9 stylus id: 15 type: STYLUS Signed-off-by: Peter Hutterer @@ -14036,7 +14248,7 @@ Conflicts: - src/wcmCommon.c + src/wcmCommon.c Signed-off-by: Peter Hutterer @@ -14101,7 +14313,7 @@ Conflicts: - src/wcmCommon.c + src/wcmCommon.c Signed-off-by: Peter Hutterer Reviewed-by: Ping Cheng @@ -14301,7 +14513,7 @@ Conflicts: - src/xf86Wacom.c + src/xf86Wacom.c Signed-off-by: Peter Hutterer Reviewed-by: Ping Cheng @@ -14509,8 +14721,8 @@ Merge branch 'master' of git://people.freedesktop.org/~gnadon/xf86-input-wacom Conflicts: - configure.ac - man/Makefile.am + configure.ac + man/Makefile.am commit 370cd8bcce46a091da2479fdb8171b1b58a8616c Author: Peter Hutterer @@ -17693,7 +17905,7 @@ Merge branch 'xsetwacom' Conflicts: - src/wcmXCommand.c + src/wcmXCommand.c commit bffe7c23591c0d1ae70e73a27fab669d4a190ade Author: Przemo Firszt @@ -19197,9 +19409,9 @@ The default output for the driver loading is: (II) Module wacom: vendor="X.Org Foundation" - compiled for 1.6.99.901, module version = 0.9.1 - Module class: X.Org XInput Driver - ABI class: X.Org XInput driver, version 7.0 + compiled for 1.6.99.901, module version = 0.9.1 + Module class: X.Org XInput Driver + ABI class: X.Org XInput driver, version 7.0 where the module version is now filled in by the package version set in configure. An extra identification string is superfluous. diff -Nru xf86-input-wacom-0.33.0/configure xf86-input-wacom-0.34.0/configure --- xf86-input-wacom-0.33.0/configure 2016-05-13 22:55:14.000000000 +0000 +++ xf86-input-wacom-0.34.0/configure 2016-12-05 18:52:05.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for xf86-input-wacom 0.33.0. +# Generated by GNU Autoconf 2.69 for xf86-input-wacom 0.34.0. # # Report bugs to . # @@ -651,8 +651,8 @@ # Identity of this package. PACKAGE_NAME='xf86-input-wacom' PACKAGE_TARNAME='xf86-input-wacom' -PACKAGE_VERSION='0.33.0' -PACKAGE_STRING='xf86-input-wacom 0.33.0' +PACKAGE_VERSION='0.34.0' +PACKAGE_STRING='xf86-input-wacom 0.34.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' PACKAGE_URL='' @@ -1451,7 +1451,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xf86-input-wacom 0.33.0 to adapt to many kinds of systems. +\`configure' configures xf86-input-wacom 0.34.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1522,7 +1522,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xf86-input-wacom 0.33.0:";; + short | recursive ) echo "Configuration of xf86-input-wacom 0.34.0:";; esac cat <<\_ACEOF @@ -1673,7 +1673,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xf86-input-wacom configure 0.33.0 +xf86-input-wacom configure 0.34.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2088,7 +2088,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xf86-input-wacom $as_me 0.33.0, which was +It was created by xf86-input-wacom $as_me 0.34.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2957,7 +2957,7 @@ # Define the identity of the package. PACKAGE='xf86-input-wacom' - VERSION='0.33.0' + VERSION='0.34.0' cat >>confdefs.h <<_ACEOF @@ -19864,7 +19864,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xf86-input-wacom $as_me 0.33.0, which was +This file was extended by xf86-input-wacom $as_me 0.34.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19930,7 +19930,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xf86-input-wacom config.status 0.33.0 +xf86-input-wacom config.status 0.34.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru xf86-input-wacom-0.33.0/configure.ac xf86-input-wacom-0.34.0/configure.ac --- xf86-input-wacom-0.33.0/configure.ac 2016-05-13 22:32:03.000000000 +0000 +++ xf86-input-wacom-0.34.0/configure.ac 2016-12-05 18:50:16.000000000 +0000 @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-wacom], - [0.33.0], + [0.34.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-wacom]) AC_CONFIG_MACRO_DIR([m4]) diff -Nru xf86-input-wacom-0.33.0/debian/changelog xf86-input-wacom-0.34.0/debian/changelog --- xf86-input-wacom-0.33.0/debian/changelog 2016-05-24 01:52:37.000000000 +0000 +++ xf86-input-wacom-0.34.0/debian/changelog 2017-03-07 09:17:05.000000000 +0000 @@ -1,8 +1,22 @@ +xf86-input-wacom (1:0.34.0-0ubuntu2) zesty; urgency=medium + + * fix-tests.diff: Fix test build against new xserver. + + -- Timo Aaltonen Tue, 07 Mar 2017 11:16:53 +0200 + +xf86-input-wacom (1:0.34.0-0ubuntu1) zesty; urgency=medium + + * New upstream release. + * control: Drop -dbg package. + * disable-tests.diff: Dropped, tests pass again. + + -- Timo Aaltonen Mon, 06 Mar 2017 15:27:59 +0200 + xf86-input-wacom (1:0.33.0-0ubuntu1) yakkety; urgency=medium - * New upstream release + * New upstream release. - -- Robert Ancell Tue, 24 May 2016 13:48:43 +1200 + -- Timo Aaltonen Mon, 19 Sep 2016 14:32:35 +0300 xf86-input-wacom (1:0.32.0-0ubuntu3) xenial; urgency=medium diff -Nru xf86-input-wacom-0.33.0/debian/control xf86-input-wacom-0.34.0/debian/control --- xf86-input-wacom-0.33.0/debian/control 2016-05-24 01:52:37.000000000 +0000 +++ xf86-input-wacom-0.34.0/debian/control 2017-03-06 12:50:49.000000000 +0000 @@ -30,15 +30,3 @@ Conflicts: wacom-tools (<< 0.10.0) Description: X.Org X server -- Wacom input driver This package provides the X.Org driver for Wacom tablet devices. - -Package: xserver-xorg-input-wacom-dbg -Architecture: linux-any -Depends: - ${misc:Depends}, - xserver-xorg-input-wacom (= ${binary:Version}), -Section: debug -Priority: extra -Description: X.Org X server -- Wacom input driver - This package provides the X.Org driver for Wacom tablet devices. - . - This package provides debugging symbols for this Xorg X driver. diff -Nru xf86-input-wacom-0.33.0/debian/patches/disable-tests.diff xf86-input-wacom-0.34.0/debian/patches/disable-tests.diff --- xf86-input-wacom-0.33.0/debian/patches/disable-tests.diff 2016-05-24 01:52:37.000000000 +0000 +++ xf86-input-wacom-0.34.0/debian/patches/disable-tests.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -diff --git a/Makefile.am b/Makefile.am -index 2293d88..75abd72 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -22,7 +22,7 @@ - DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg' \ - --with-xorg-conf-dir='$${datadir}/X11/xorg.conf.d' - --SUBDIRS = conf doc src man include tools test -+SUBDIRS = conf doc src man include tools - MAINTAINERCLEANFILES = ChangeLog INSTALL - - pkgconfigdir = $(libdir)/pkgconfig diff -Nru xf86-input-wacom-0.33.0/debian/patches/fix-tests.diff xf86-input-wacom-0.34.0/debian/patches/fix-tests.diff --- xf86-input-wacom-0.33.0/debian/patches/fix-tests.diff 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-wacom-0.34.0/debian/patches/fix-tests.diff 2017-03-07 09:15:59.000000000 +0000 @@ -0,0 +1,44 @@ +commit f0dedf7a610ac97bc45738492b98ce4f1e0514ec +Author: Jason Gerecke +Date: Wed Jan 18 09:00:10 2017 -0800 + + tests: Fix compilation under ABI 25 and greater + + The X server recently deprecated xf86BlockSIGIO and xf86UnblockSIGIO and + simultaneously defined them inline within xf86.h. The new inline definition + causes problems both because fake-symbols.c will end up redefining them, + and because the function bodies reference a symbol that does not get included + when building the tests. To fix these errors, update fake-symbols.c with + updated include guards and a definition of the undefined symbols. + + Signed-off-by: Jason Gerecke + Reviewed-by: Peter Hutterer + +diff --git a/test/fake-symbols.c b/test/fake-symbols.c +index 6f2c10a..e649fb9 100644 +--- a/test/fake-symbols.c ++++ b/test/fake-symbols.c +@@ -493,6 +493,7 @@ void TimerFree(OsTimerPtr timer) + { + } + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 24 + int + xf86BlockSIGIO (void) + { +@@ -503,6 +504,15 @@ void + xf86UnblockSIGIO (int wasset) + { + } ++#else ++void input_lock (void) ++{ ++} ++ ++void input_unlock (void) ++{ ++} ++#endif + + /* This is not the same as the X server one, but it'll do for the tests */ + #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14 diff -Nru xf86-input-wacom-0.33.0/debian/patches/series xf86-input-wacom-0.34.0/debian/patches/series --- xf86-input-wacom-0.33.0/debian/patches/series 2016-05-24 01:52:37.000000000 +0000 +++ xf86-input-wacom-0.34.0/debian/patches/series 2017-03-07 09:16:18.000000000 +0000 @@ -1 +1 @@ -disable-tests.diff +fix-tests.diff diff -Nru xf86-input-wacom-0.33.0/debian/rules xf86-input-wacom-0.34.0/debian/rules --- xf86-input-wacom-0.33.0/debian/rules 2016-05-24 01:52:37.000000000 +0000 +++ xf86-input-wacom-0.34.0/debian/rules 2017-03-06 13:26:02.000000000 +0000 @@ -6,6 +6,10 @@ --with-xorg-module-dir=/usr/lib/xorg/modules \ --with-systemd-unit-dir=/lib/systemd/system +override_dh_auto_install: + dh_auto_install \ + --destdir=debian/tmp + override_dh_install: find debian/tmp -name '*.la' -delete mv $(CURDIR)/debian/tmp/lib/udev/rules.d/wacom.rules \ @@ -18,7 +22,3 @@ %: dh $@ --with quilt,autoreconf,xsf - -# Debug package: -override_dh_strip: - dh_strip --dbg-package=xserver-xorg-input-wacom-dbg diff -Nru xf86-input-wacom-0.33.0/Makefile.in xf86-input-wacom-0.34.0/Makefile.in --- xf86-input-wacom-0.33.0/Makefile.in 2016-05-13 22:55:16.000000000 +0000 +++ xf86-input-wacom-0.34.0/Makefile.in 2016-12-05 18:52:06.000000000 +0000 @@ -678,7 +678,7 @@ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 @@ -703,7 +703,7 @@ @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -721,7 +721,7 @@ distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -731,7 +731,7 @@ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac diff -Nru xf86-input-wacom-0.33.0/man/xsetwacom.man xf86-input-wacom-0.34.0/man/xsetwacom.man --- xf86-input-wacom-0.33.0/man/xsetwacom.man 2015-10-23 17:26:33.000000000 +0000 +++ xf86-input-wacom-0.34.0/man/xsetwacom.man 2016-12-05 18:38:48.000000000 +0000 @@ -109,7 +109,7 @@ Action mappings allow button presses to perform many events. They take the form of a string of keywords and arguments. -The "key" keyword is following by a list of key names. These can optionally +The "key" keyword is followed by a list of key names. These can optionally be preceded by "+" for press and "-" for release. If +/- is not given, press-and-release is assumed, except for modifier keys which are left pressed. Key names can be X11 KeySyms or some aliases such as 'shift' or 'f1' (the @@ -117,9 +117,16 @@ .B list modifiers command). -For example, "key +a +shift b -shift -a" converts the button into a series of -keystrokes, in this example "press a, press shift, press and release b, -release shift, release a". +To assign a key that is not in the modifiers list, use the KeySym in +/usr/include/X11/keysymdef.h with the XK_ prefix removed or its actual value +as is. For example, XK_BackSpace should be specified as "BackSpace". "0xff80" +can also be used to replace "BackSpace" since it's the unique KeySym value of +Backspace key. + +Here is a combined example: "key +a shift b shift -a 0xff0d" converts the +button into a series of keystrokes. In this example, "press a, press shift, +press and release b, release shift, release a, then press and release enter". +"key +a +shift b -shift -a 0xff0d" does the same thing. The "button" keyword is similar except that its arguments are X11 button numbers. diff -Nru xf86-input-wacom-0.33.0/src/wcmCommon.c xf86-input-wacom-0.34.0/src/wcmCommon.c --- xf86-input-wacom-0.33.0/src/wcmCommon.c 2016-01-05 21:36:57.000000000 +0000 +++ xf86-input-wacom-0.34.0/src/wcmCommon.c 2016-12-05 18:38:48.000000000 +0000 @@ -361,6 +361,7 @@ int first_val, int num_vals, int *valuators) { WacomDevicePtr priv = (WacomDevicePtr) pInfo->private; + WacomCommonPtr common = priv->common; int delta = 0, idx = 0; DBG(10, priv, "\n"); @@ -396,7 +397,7 @@ } /* emulate events for left touch ring */ - delta = getScrollDelta(ds->abswheel, priv->oldState.abswheel, MAX_PAD_RING, AXIS_INVERT); + delta = getScrollDelta(ds->abswheel, priv->oldState.abswheel, common->wcmMaxRing, AXIS_INVERT); idx = getWheelButton(delta, WHEEL_ABS_UP, WHEEL_ABS_DN); if (idx >= 0 && IsPad(priv) && priv->oldState.proximity == ds->proximity) { @@ -406,7 +407,7 @@ } /* emulate events for right touch ring */ - delta = getScrollDelta(ds->abswheel2, priv->oldState.abswheel2, MAX_PAD_RING, AXIS_INVERT); + delta = getScrollDelta(ds->abswheel2, priv->oldState.abswheel2, common->wcmMaxRing, AXIS_INVERT); idx = getWheelButton(delta, WHEEL2_ABS_UP, WHEEL2_ABS_DN); if (idx >= 0 && IsPad(priv) && priv->oldState.proximity == ds->proximity) { @@ -853,29 +854,38 @@ if (IsPad(priv)) { /* Pad may never be the "active" pointer controller */ + DBG(6, priv, "Event from pad; not yielding pointer control\n."); return FALSE; } if (active == NULL || active->oldState.device_id == ds->device_id) { - DBG(11, priv, "Same device ID as active; allowing access.\n"); + DBG(11, priv, "Event from active device; maintaining pointer control.\n"); return TRUE; } - else if (IsCursor(active) && IsTouch(priv)) { - /* Cursor devices are often left idle in range, so allow touch to - * grab control if the tool has not been used for some time. + else if (IsCursor(active)) { + /* Cursor devices are often left idle in range, so allow other devices + * to grab control if the tool has not been used for some time. */ - return (ds->time - active->oldState.time > 100); + Bool yield = (ds->time - active->oldState.time > 100) && (active->oldState.buttons == 0); + DBG(6, priv, "Currently-active cursor %s idle; %s pointer control.\n", + yield ? "is" : "is not", yield ? "yielding" : "not yielding"); + return yield; } - else if (IsTouch(active) && IsCursor(priv)) { + else if (IsCursor(priv)) { /* An otherwise idle cursor may still occasionally jitter and send - * events while the user is making active touches. Do not allow - * the cursor to grab control in this particular case. + * events while the user is actively using other tools or touching + * the device. Do not allow the cursor to grab control in this + * particular case. */ + DBG(6, priv, "Event from non-active cursor; not yielding pointer control.\n"); return FALSE; } else { /* Non-touch input has priority over touch in general */ - return !IsTouch(priv); + Bool yield = !IsTouch(priv); + DBG(6, priv, "Event from non-active %s device; %s pointer control.\n", + yield ? "non-touch" : "touch", yield ? "yielding" : "not yielding"); + return yield; } } @@ -1186,7 +1196,7 @@ if (priv->serial && filtered.serial_num != priv->serial) { DBG(10, priv, "serial number" - " is %u but your system configured %u", + " is %u but your system configured %u\n", filtered.serial_num, priv->serial); return; } @@ -1394,7 +1404,10 @@ p = min(FILTER_PRESSURE_RES, p); /* apply pressure curve function */ - return pDev->pPressCurve[p]; + if (pDev->pPressCurve == NULL) + return p; + else + return pDev->pPressCurve[p]; } /***************************************************************************** diff -Nru xf86-input-wacom-0.33.0/src/wcmFilter.c xf86-input-wacom-0.34.0/src/wcmFilter.c --- xf86-input-wacom-0.33.0/src/wcmFilter.c 2016-01-05 21:36:57.000000000 +0000 +++ xf86-input-wacom-0.34.0/src/wcmFilter.c 2016-12-05 18:38:48.000000000 +0000 @@ -54,23 +54,35 @@ void wcmSetPressureCurve(WacomDevicePtr pDev, int x0, int y0, int x1, int y1) { - int i; - /* sanity check values */ if (!wcmCheckPressureCurveValues(x0, y0, x1, y1)) return; - /* linear by default */ - for (i=0; i<=FILTER_PRESSURE_RES; ++i) - pDev->pPressCurve[i] = i; + /* A NULL pPressCurve indicates the (default) linear curve */ + if (x0 == 0 && y0 == 0 && x1 == 100 && y1 == 100) { + free(pDev->pPressCurve); + pDev->pPressCurve = NULL; + } + else if (!pDev->pPressCurve) { + pDev->pPressCurve = calloc(FILTER_PRESSURE_RES+1, sizeof(*pDev->pPressCurve)); + + if (!pDev->pPressCurve) { + LogMessageVerbSigSafe(X_WARNING, 0, + "Unable to allocate memory for pressure curve; using default.\n"); + x0 = 0; + y0 = 0; + x1 = 100; + y1 = 100; + } + } - /* draw bezier line from bottom-left to top-right using ctrl points */ - filterCurveToLine(pDev->pPressCurve, - FILTER_PRESSURE_RES, - 0.0, 0.0, /* bottom left */ - x0/100.0, y0/100.0, /* control point 1 */ - x1/100.0, y1/100.0, /* control point 2 */ - 1.0, 1.0); /* top right */ + if (pDev->pPressCurve) + filterCurveToLine(pDev->pPressCurve, + FILTER_PRESSURE_RES, + 0.0, 0.0, /* bottom left */ + x0/100.0, y0/100.0, /* control point 1 */ + x1/100.0, y1/100.0, /* control point 2 */ + 1.0, 1.0); /* top right */ pDev->nPressCtrl[0] = x0; pDev->nPressCtrl[1] = y0; diff -Nru xf86-input-wacom-0.33.0/src/wcmUSB.c xf86-input-wacom-0.34.0/src/wcmUSB.c --- xf86-input-wacom-0.33.0/src/wcmUSB.c 2016-01-05 21:36:57.000000000 +0000 +++ xf86-input-wacom-0.34.0/src/wcmUSB.c 2016-12-05 18:38:48.000000000 +0000 @@ -652,6 +652,16 @@ common->wcmMaxStripX = absinfo.maximum; } + /* max touchring value for standalone pad tools */ + common->wcmMinRing = 0; + common->wcmMaxRing = 71; + if (!ISBITSET(ev,EV_MSC) && ISBITSET(abs, ABS_WHEEL) && + !ioctl(pInfo->fd, EVIOCGABS(ABS_WHEEL), &absinfo)) + { + common->wcmMinRing = absinfo.minimum; + common->wcmMaxRing = absinfo.maximum; + } + /* X tilt range */ if (ISBITSET(abs, ABS_TILT_X) && !ioctl(pInfo->fd, EVIOCGABS(ABS_TILT_X), &absinfo)) diff -Nru xf86-input-wacom-0.33.0/src/wcmValidateDevice.c xf86-input-wacom-0.34.0/src/wcmValidateDevice.c --- xf86-input-wacom-0.33.0/src/wcmValidateDevice.c 2015-10-23 17:26:33.000000000 +0000 +++ xf86-input-wacom-0.34.0/src/wcmValidateDevice.c 2016-12-05 18:38:48.000000000 +0000 @@ -498,11 +498,19 @@ WacomHotplugInfo *hotplug_info = closure; DeviceIntPtr dev; /* dummy */ +#if HAVE_THREADED_INPUT + input_lock(); +#endif + NewInputDeviceRequest(hotplug_info->input_options, #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 9 hotplug_info->attrs, #endif &dev); +#if HAVE_THREADED_INPUT + input_unlock(); +#endif + input_option_free_list(&hotplug_info->input_options); #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 diff -Nru xf86-input-wacom-0.33.0/src/wcmXCommand.c xf86-input-wacom-0.34.0/src/wcmXCommand.c --- xf86-input-wacom-0.33.0/src/wcmXCommand.c 2016-02-05 22:08:29.000000000 +0000 +++ xf86-input-wacom-0.34.0/src/wcmXCommand.c 2016-12-05 18:38:48.000000000 +0000 @@ -104,6 +104,26 @@ #endif /** + * Calculate a user-visible pressure level from a driver-internal pressure + * level. Pressure settings exposed to the user assume a range of 0-2047 + * while the driver scales everything to a range of 0-FILTER_PRESSURE_RES. + */ +static inline int wcmInternalToUserPressure(int pressure) +{ + return pressure / (FILTER_PRESSURE_RES / 2048); +} + +/** + * Calculate a driver-internal pressure level from a user-visible pressure + * level. Pressure settings exposed to the user assume a range of 0-2047 + * while the driver scales everything to a range of 0-FILTER_PRESSURE_RES. + */ +static inline int wcmUserToInternalPressure(int pressure) +{ + return pressure * (FILTER_PRESSURE_RES / 2048); +} + +/** * Resets an arbitrary Action property, given a pointer to the old * handler and information about the new Action. */ @@ -256,6 +276,7 @@ } values[0] = (!common->wcmMaxZ) ? 0 : common->wcmThreshold; + values[0] = wcmInternalToUserPressure(values[0]); prop_threshold = InitWcmAtom(pInfo->dev, WACOM_PROP_PRESSURE_THRESHOLD, XA_INTEGER, 32, 1, values); values[0] = common->wcmSuppress; @@ -612,36 +633,43 @@ } } -static CARD32 -touchTimerFunc(OsTimerPtr timer, CARD32 now, pointer arg) +static void +wcmSetHWTouchProperty(InputInfoPtr pInfo) { - InputInfoPtr pInfo = arg; WacomDevicePtr priv = pInfo->private; WacomCommonPtr common = priv->common; XIPropertyValuePtr prop; CARD8 prop_value; - int sigstate; int rc; - sigstate = xf86BlockSIGIO(); - rc = XIGetDeviceProperty(pInfo->dev, prop_hardware_touch, &prop); if (rc != Success || prop->format != 8 || prop->size != 1) { xf86Msg(X_ERROR, "%s: Failed to update hardware touch state.\n", pInfo->name); - return 0; + return; } prop_value = common->wcmHWTouchSwitchState; XIChangeDeviceProperty(pInfo->dev, prop_hardware_touch, XA_INTEGER, prop->format, PropModeReplace, prop->size, &prop_value, TRUE); +} + +#if !HAVE_THREADED_INPUT +static CARD32 +touchTimerFunc(OsTimerPtr timer, CARD32 now, pointer arg) +{ + InputInfoPtr pInfo = arg; + int sigstate = xf86BlockSIGIO(); + + wcmSetHWTouchProperty(pInfo); xf86UnblockSIGIO(sigstate); return 0; } +#endif /** * Update HW touch property when its state is changed by touch switch @@ -656,10 +684,14 @@ common->wcmHWTouchSwitchState = hw_touch; +#if HAVE_THREADED_INPUT + wcmSetHWTouchProperty(priv->pInfo); +#else /* This function is called during SIGIO. Schedule timer for property * event delivery outside of signal handler. */ priv->touch_timer = TimerSet(priv->touch_timer, 0 /* reltime */, 1, touchTimerFunc, priv->pInfo); +#endif } /** @@ -816,6 +848,7 @@ common->wcmCursorProxoutDist = value; } else if (property == prop_threshold) { + const INT32 MAXIMUM = wcmInternalToUserPressure(FILTER_PRESSURE_RES); INT32 value; if (prop->size != 1 || prop->format != 32) @@ -825,8 +858,10 @@ if (value == -1) value = DEFAULT_THRESHOLD; - else if ((value < 1) || (value > FILTER_PRESSURE_RES)) + else if ((value < 1) || (value > MAXIMUM)) return BadValue; + else + value = wcmUserToInternalPressure(value); if (!checkonly) common->wcmThreshold = value; @@ -1014,24 +1049,20 @@ return Success; } -static CARD32 -serialTimerFunc(OsTimerPtr timer, CARD32 now, pointer arg) +static void +wcmSetSerialProperty(InputInfoPtr pInfo) { - InputInfoPtr pInfo = arg; WacomDevicePtr priv = pInfo->private; XIPropertyValuePtr prop; CARD32 prop_value[5]; - int sigstate; int rc; - sigstate = xf86BlockSIGIO(); - rc = XIGetDeviceProperty(pInfo->dev, prop_serials, &prop); if (rc != Success || prop->format != 32 || prop->size != 5) { xf86Msg(X_ERROR, "%s: Failed to update serial number.\n", pInfo->name); - return 0; + return; } memcpy(prop_value, prop->data, sizeof(prop_value)); @@ -1041,11 +1072,22 @@ XIChangeDeviceProperty(pInfo->dev, prop_serials, XA_INTEGER, prop->format, PropModeReplace, prop->size, prop_value, TRUE); +} + +#if !HAVE_THREADED_INPUT +static CARD32 +serialTimerFunc(OsTimerPtr timer, CARD32 now, pointer arg) +{ + InputInfoPtr pInfo = arg; + int sigstate = xf86BlockSIGIO(); + + wcmSetSerialProperty(pInfo); xf86UnblockSIGIO(sigstate); return 0; } +#endif void wcmUpdateSerial(InputInfoPtr pInfo, unsigned int serial, int id) @@ -1058,10 +1100,14 @@ priv->cur_serial = serial; priv->cur_device_id = id; +#if HAVE_THREADED_INPUT + wcmSetSerialProperty(pInfo); +#else /* This function is called during SIGIO. Schedule timer for property * event delivery outside of signal handler. */ priv->serial_timer = TimerSet(priv->serial_timer, 0 /* reltime */, 1, serialTimerFunc, pInfo); +#endif } static void diff -Nru xf86-input-wacom-0.33.0/src/xf86Wacom.c xf86-input-wacom-0.34.0/src/xf86Wacom.c --- xf86-input-wacom-0.33.0/src/xf86Wacom.c 2015-10-23 17:26:33.000000000 +0000 +++ xf86-input-wacom-0.34.0/src/xf86Wacom.c 2016-12-05 18:38:48.000000000 +0000 @@ -282,8 +282,8 @@ { /* Touch ring */ label = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_WHEEL); - min = MIN_PAD_RING; - max = MAX_PAD_RING; + min = common->wcmMinRing; + max = common->wcmMaxRing; } wcmInitAxis(pInfo->dev, index, label, min, max, res, min_res, max_res, mode); @@ -298,8 +298,8 @@ mode = Absolute; min_res = max_res = res = 1; - min = MIN_PAD_RING; - max = MAX_PAD_RING; + min = common->wcmMinRing; + max = common->wcmMaxRing; wcmInitAxis(pInfo->dev, index, label, min, max, res, min_res, max_res, mode); } @@ -854,7 +854,6 @@ break; case DEVICE_OFF: - case DEVICE_CLOSE: wcmDisableTool(pWcm); wcmUnlinkTouchAndPen(pInfo); if (pInfo->fd >= 0) @@ -864,6 +863,8 @@ } pWcm->public.on = FALSE; break; + case DEVICE_CLOSE: + break; #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) * 100 + GET_ABI_MINOR(ABI_XINPUT_VERSION) >= 1901 case DEVICE_ABORT: break; diff -Nru xf86-input-wacom-0.33.0/src/xf86WacomDefs.h xf86-input-wacom-0.34.0/src/xf86WacomDefs.h --- xf86-input-wacom-0.33.0/src/xf86WacomDefs.h 2016-01-05 21:36:57.000000000 +0000 +++ xf86-input-wacom-0.34.0/src/xf86WacomDefs.h 2016-12-05 18:38:48.000000000 +0000 @@ -48,9 +48,6 @@ #define TILT_MIN -64 /* Minimum reported tilt value */ #define TILT_MAX 63 /* Maximum reported tilt value */ -#define MIN_PAD_RING 0 /* I4 absolute scroll ring min value */ -#define MAX_PAD_RING 71 /* I4 absolute scroll ring max value */ - /* I4 cursor tool has a rotation offset of 175 degrees */ #define INTUOS4_CURSOR_ROTATION_OFFSET 175 @@ -183,7 +180,7 @@ #define IsUSBDevice(common) ((common)->wcmDevCls == &gWacomUSBDevice) -#define FILTER_PRESSURE_RES 2048 /* maximum points in pressure curve */ +#define FILTER_PRESSURE_RES 65536 /* maximum points in pressure curve */ /* Tested result for setting the pressure threshold to a reasonable value */ #define THRESHOLD_TOLERANCE (FILTER_PRESSURE_RES / 125) #define DEFAULT_THRESHOLD (FILTER_PRESSURE_RES / 75) @@ -235,8 +232,8 @@ }; static const struct _WacomDeviceState OUTPROX_STATE = { - .abswheel = MAX_PAD_RING + 1, - .abswheel2 = MAX_PAD_RING + 1 + .abswheel = INT_MAX, + .abswheel2 = INT_MAX }; struct _WacomDeviceRec @@ -288,8 +285,7 @@ struct _WacomDeviceState oldState; /* previous state information */ int oldCursorHwProx; /* previous cursor hardware proximity */ - /* JEJ - filters */ - int pPressCurve[FILTER_PRESSURE_RES + 1]; /* pressure curve */ + int *pPressCurve; /* pressure curve */ int nPressCtrl[4]; /* control points for curve */ int minPressure; /* the minimum pressure a pen may hold */ int oldMinPressure; /* to record the last minPressure before going out of proximity */ @@ -436,6 +432,8 @@ int wcmMaxStripX; /* Maximum fingerstrip X */ int wcmMaxStripY; /* Maximum fingerstrip Y */ + int wcmMinRing; /* Minimum touchring value */ + int wcmMaxRing; /* Maximum touchring value */ WacomDevicePtr wcmDevices; /* list of devices sharing same port */ int wcmPktLength; /* length of a packet */ diff -Nru xf86-input-wacom-0.33.0/src/xf86Wacom.h xf86-input-wacom-0.34.0/src/xf86Wacom.h --- xf86-input-wacom-0.33.0/src/xf86Wacom.h 2015-10-23 17:26:33.000000000 +0000 +++ xf86-input-wacom-0.34.0/src/xf86Wacom.h 2016-12-05 18:38:48.000000000 +0000 @@ -40,6 +40,10 @@ #define LogMessageVerbSigSafe xf86MsgVerb #endif +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 23 +#define HAVE_THREADED_INPUT 1 +#endif + #ifndef SW_MUTE_DEVICE #define SW_MUTE_DEVICE 0x0e #endif diff -Nru xf86-input-wacom-0.33.0/tools/xsetwacom.c xf86-input-wacom-0.34.0/tools/xsetwacom.c --- xf86-input-wacom-0.33.0/tools/xsetwacom.c 2016-01-25 19:00:10.000000000 +0000 +++ xf86-input-wacom-0.34.0/tools/xsetwacom.c 2016-12-05 18:38:48.000000000 +0000 @@ -605,6 +605,8 @@ {"backspace", "BackSpace"}, {"Backspace", "BackSpace"}, + {"return", "Return"}, + {"tab", "Tab"}, {"PgUp", "Prior"}, {"PgDn", "Next"}, @@ -937,6 +939,9 @@ m = specialkeys; while(m->name) printf(" %s\n", m++->name); + + printf("Keys not listed above can be specified via their KeySyms." + " See the man page for details.\n"); } static void list(Display *dpy, int argc, char **argv)