libinput: Changes to 'upstream-unstable'
meson.build |2 - src/evdev-fallback.c | 35 +-- test/test-keyboard.c | 56 +++ tools/libinput-measure-touch-size|3 + tools/libinput-measure-touchpad-pressure |3 + tools/libinput-measure-trackpoint-range |4 +- 6 files changed, 83 insertions(+), 20 deletions(-) New commits: commit a5c19a57902713bf9d47e3d8bde1d6a30bac6db1 Author: Peter HuttererDate: Thu Dec 14 15:51:53 2017 +1000 libinput 1.9.4 Signed-off-by: Peter Hutterer diff --git a/meson.build b/meson.build index 256a248..fe353ef 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('libinput', 'c', 'cpp', - version : '1.9.3', + version : '1.9.4', license : 'MIT/Expat', default_options : [ 'c_std=gnu99', 'warning_level=2' ], meson_version : '>= 0.40.0') commit bf857d38416ecbfbd358d477c0fb90137c48ab03 Author: Peter Hutterer Date: Thu Nov 30 14:21:22 2017 +1000 tools: print the device in all measure tools Signed-off-by: Peter Hutterer (cherry picked from commit 0b8372962b425437ac7d1248cffccf4a7890a556) diff --git a/tools/libinput-measure-touch-size b/tools/libinput-measure-touch-size index b7aa0e9..f609749 100755 --- a/tools/libinput-measure-touch-size +++ b/tools/libinput-measure-touch-size @@ -186,6 +186,9 @@ class Device(object): self.path = path self.device = evdev.InputDevice(self.path) + +print("Using {}: {}\n".format(self.device.name, self.path)) + # capabilities returns a dict with the EV_* codes as key, # each of which is a list of tuples of (code, AbsInfo) # diff --git a/tools/libinput-measure-touchpad-pressure b/tools/libinput-measure-touchpad-pressure index 052d64d..83ae224 100755 --- a/tools/libinput-measure-touchpad-pressure +++ b/tools/libinput-measure-touchpad-pressure @@ -145,6 +145,9 @@ class Device(object): self.path = path self.device = evdev.InputDevice(self.path) + +print("Using {}: {}\n".format(self.device.name, self.path)) + # capabilities rturns a dict with the EV_* codes as key, # each of which is a list of tuples of (code, AbsInfo) # commit a0a5e9eb7e686055d992fef560f8a6747cbf3e1c Author: Peter Hutterer Date: Wed Nov 29 14:15:49 2017 +1000 tools: print out the device used for measuring the trackpoint range Suggested in https://bugs.freedesktop.org/show_bug.cgi?id=103947#c2 Signed-off-by: Peter Hutterer (cherry picked from commit d1146930daef0b9259154658cface5a4f8f5386f) diff --git a/tools/libinput-measure-trackpoint-range b/tools/libinput-measure-trackpoint-range index 4040361..eac84e3 100755 --- a/tools/libinput-measure-trackpoint-range +++ b/tools/libinput-measure-trackpoint-range @@ -60,6 +60,8 @@ class Device(object): self.device = evdev.InputDevice(self.path) +print("Using {}: {}\n".format(self.device.name, path)) + self.deltas = [] self.nxdeltas = 0 self.nydeltas = 0 commit 5cf08e81057171fdd33e7e6ee9ade2ea7c723866 Author: Peter Hutterer Date: Wed Nov 29 11:31:10 2017 +1000 tools: clarify PermissionError in measure-trackpoint-range Signed-off-by: Peter Hutterer (cherry picked from commit ac1d5082fe87c52420720ca46b7862a214c61618) diff --git a/tools/libinput-measure-trackpoint-range b/tools/libinput-measure-trackpoint-range index 512978c..4040361 100755 --- a/tools/libinput-measure-trackpoint-range +++ b/tools/libinput-measure-trackpoint-range @@ -189,7 +189,7 @@ def main(args): except KeyboardInterrupt: device.print_summary() except (PermissionError, OSError): -print("Error: failed to open device") +print("Error: failed to open device. Are you running as root?") except InvalidDeviceError as e: print("Error: {}".format(e)) commit c863ab5c8e61ae006b5797ffbefd6fcc206b30fa Author: Peter Hutterer Date: Fri Dec 8 09:41:07 2017 +1000 fallback: send key events out immediately upon receiving them Commit db3b6fe5f7f8 "fallback: change to handle the state at EV_SYN time" introduced regressions for two types of event sequences. One is a kernel bug - some devices/drivers like the asus-wireless send a key press + release within the same event frame which now cancels out and disappears into the ether. This should be fixed in the kernel drivers but there appear to be enough of them that we can't just pretend it's an outlier. The second issue is a libinput bug. If we get two key events in the same frame (e.g. shift + A) we update the state
libinput: Changes to 'upstream-unstable'
doc/button-debouncing-state-machine.svg| 714 + doc/button-debouncing-wave-diagram.txt | 50 ++ doc/button_debouncing.dox | 33 + doc/svg/button-debouncing-wave-diagram.svg |4 meson.build|5 src/evdev-debounce.c | 562 ++ src/evdev-fallback.c | 694 src/evdev-fallback.h | 222 + src/evdev-mt-touchpad-buttons.c|6 src/evdev-mt-touchpad.c|5 src/evdev.c| 10 src/evdev.h| 24 test/litest.c | 22 test/litest.h |7 test/test-device.c | 12 test/test-misc.c |6 test/test-pad.c| 16 test/test-pointer.c| 371 ++- test/test-touchpad-buttons.c |8 test/test-touchpad-tap.c | 12 test/test-touchpad.c | 116 ++-- test/test-trackpoint.c | 16 tools/libinput-measure-touchpad-tap.man|2 tools/libinput.man |2 24 files changed, 2189 insertions(+), 730 deletions(-) New commits: commit 05a2da818b7ff6d629b90611e8b4a0e06eb5b0ba Author: Peter HuttererDate: Tue Nov 28 15:06:20 2017 +1000 libinput 1.9.3 Signed-off-by: Peter Hutterer diff --git a/meson.build b/meson.build index 5fac32d..256a248 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('libinput', 'c', 'cpp', - version : '1.9.2', + version : '1.9.3', license : 'MIT/Expat', default_options : [ 'c_std=gnu99', 'warning_level=2' ], meson_version : '>= 0.40.0') commit 6e8beeb28008708e250b16d65fde1774d18e0131 Author: Peter Hutterer Date: Thu Nov 23 09:41:01 2017 +1000 tools: fix dashes in man page Signed-off-by: Peter Hutterer (cherry picked from commit 1b54b726f07faec48be86b6308a40b658d423147) diff --git a/tools/libinput.man b/tools/libinput.man index ee129fc..a06bdd4 100644 --- a/tools/libinput.man +++ b/tools/libinput.man @@ -54,7 +54,7 @@ Measure tap-to-click time .B libinput\-measure\-touchpad\-pressure(1) Measure touch pressure .TP 8 -.B libinput-measure-trackpoint-range(1) +.B libinput\-measure\-trackpoint\-range(1) Measure the delta range of a trackpoint .SH LIBINPUT Part of the commit e961c1ff5c81c7b72bb036b039509699cfc7be20 Author: Peter Hutterer Date: Tue Nov 21 16:02:13 2017 +1000 debounce: handle a timeout in MAYBE_SPURIOUS state Sequences to trigger: - spurious debouncing is enabled - release a button in IS_DOWN state -> RELEASE_DELAYED - short timeout triggers RELEASE_WAITING If a button press now comes before the long timeout expires, we transition to MAYBE_SPURIOUS where the long timeout may expire. In that case we should transition to pressed state again. Reported-by: Vicente Bergas Signed-off-by: Peter Hutterer (cherry picked from commit ac1748ef4dadde650802ed377f09567a37abcc80) diff --git a/doc/button-debouncing-state-machine.svg b/doc/button-debouncing-state-machine.svg index 6f106a8..48723a1 100644 --- a/doc/button-debouncing-state-machine.svg +++ b/doc/button-debouncing-state-machine.svg @@ -1,6 +1,6 @@ http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;> -http://www.w3.org/2000/svg; xmlns:xlink="http://www.w3.org/1999/xlink; width="1108px" height="2101px" version="1.1" content="mxfile userAgent=Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 version=7.7.1 editor=www.draw.io type=googlediagram id=27c35eac-9917-780f-69cd-550de3271581 name=Page-17V1bc5u6Fv41mXP2gzOIq/ToxM7enWnTTJ1OZz91MMg2ZxPkAVwn+9cfcRE2ElDq2AglzUNryxjkdV+ftJaujNun5z9jd7v5RHwcXuma/3xlzK50HZi6Sf/LRl7KEYTKkXUc+OXYYWAR/IvLQa0c3QU+TmoXpoSEabCtD3okirCX1sbcOCb7+mUrEtafunXXWBhYeG4ojn4L/HRTjELdPoz/hYP1hj0Z2Kj45MllF5e/JNm4PtkfDRnzK+M2JiQtXj093+Iwox6jS/G9u5ZPq4nFOEr7fEFfLj3PRo6FVi72XGOiF3f44Ya78sd+WHz/+lDONn1hJIjJLvJxdhdwZdzsN0GKF1vXyz7dU67TsU36FJYfr4IwvCUhifPvGr6FoW/S8SSNyT/46BOoLw3bpp+Us8Bxip9bfxqoCEZFDZMnnMYv9JLyCwaTllLKJlb5fn9gGbDLsc0Ru8xyzC2lZF3d+kBI+qKkZU+6mgJdl7s0JdGVbof0uTfLmL5aZ6+2MU4Sgd5UULbZyw1+dtf0azX6NpF/i+OAThvHhy89HIbOQmC7TmBTpG8Tea1LkNcWCIZ9qrL
libinput: Changes to 'upstream-unstable'
Rebased ref, commits from common ancestor: commit 56bcb2999e92b0814768cdcf075dd87a5b09e446 Author: Peter HuttererDate: Wed Nov 15 14:17:51 2017 +1000 libinput 1.9.2 Signed-off-by: Peter Hutterer diff --git a/meson.build b/meson.build index 41e6ea4..20f3960 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('libinput', 'c', 'cpp', - version : '1.9.1', + version : '1.9.2', license : 'MIT/Expat', default_options : [ 'c_std=gnu99', 'warning_level=2' ], meson_version : '>= 0.40.0') commit 4ec04fa9601f8ade44cff97b72bac7cc01ab6acd Author: Peter Hutterer Date: Wed Nov 15 13:32:30 2017 +1000 man: add --enable-middlebutton to debug-events man page Signed-off-by: Peter Hutterer (cherry picked from commit 13c9ef07a238a94ca9e5d5d7918cf589d4bd334e) diff --git a/tools/libinput-debug-events.man b/tools/libinput-debug-events.man index abccfa6..4e720fc 100644 --- a/tools/libinput-debug-events.man +++ b/tools/libinput-debug-events.man @@ -62,6 +62,9 @@ Enable or disable natural scrolling .B \-\-enable\-left\-handed|\-\-disable\-left\-handed Enable or disable left handed button configuration .TP 8 +.B \-\-enable\-middlebutton|\-\-disable\-middlebutton +Enable or disable middle button emulation +.TP 8 .B \-\-enable\-dwt|\-\-disable\-dwt Enable or disable disable-while-typing .TP 8 commit e35c202df78219aa83afea568ccbdae8040e7df7 Author: Peter Hutterer Date: Mon Nov 13 14:04:56 2017 +1000 tools: handle missing evdev/pyudev modules with a better error message Signed-off-by: Peter Hutterer (cherry picked from commit 67bfb5cf2e917649a1be34aae899248467c2989f) diff --git a/tools/libinput-measure-touch-size b/tools/libinput-measure-touch-size index 66c7571..b7aa0e9 100755 --- a/tools/libinput-measure-touch-size +++ b/tools/libinput-measure-touch-size @@ -26,9 +26,15 @@ import sys import argparse -import evdev -import evdev.ecodes -import pyudev +try: +import evdev +import evdev.ecodes +import pyudev +except ModuleNotFoundError as e: +print('Error: {}'.format(str(e)), file=sys.stderr) +print('One or more python modules are missing. Please install those ' + 'modules and re-run this tool.') +sys.exit(1) class Range(object): diff --git a/tools/libinput-measure-touchpad-pressure b/tools/libinput-measure-touchpad-pressure index 64ea7b4..052d64d 100755 --- a/tools/libinput-measure-touchpad-pressure +++ b/tools/libinput-measure-touchpad-pressure @@ -26,9 +26,15 @@ import sys import argparse -import evdev -import evdev.ecodes -import pyudev +try: +import evdev +import evdev.ecodes +import pyudev +except ModuleNotFoundError as e: +print('Error: {}'.format(str(e)), file=sys.stderr) +print('One or more python modules are missing. Please install those ' + 'modules and re-run this tool.') +sys.exit(1) class Range(object): diff --git a/tools/libinput-measure-trackpoint-range b/tools/libinput-measure-trackpoint-range index 53dc67e..512978c 100755 --- a/tools/libinput-measure-trackpoint-range +++ b/tools/libinput-measure-trackpoint-range @@ -26,9 +26,15 @@ import sys import argparse -import evdev -import evdev.ecodes -import pyudev +try: +import evdev +import evdev.ecodes +import pyudev +except ModuleNotFoundError as e: +print('Error: {}'.format(str(e)), file=sys.stderr) +print('One or more python modules are missing. Please install those ' + 'modules and re-run this tool.') +sys.exit(1) MINIMUM_EVENT_COUNT = 1000 commit 1593d7da328ca9f08c4830d9cc7ead01bb28abe2 Author: Peter Hutterer Date: Thu Nov 9 15:17:37 2017 +1000 tools: when the command isn't installed, print that Makes it more user-friendly to be able to split the tools into multiple packages Signed-off-by: Peter Hutterer (cherry picked from commit 92aa1d14183bd88a8080be96672682a2e5696477) diff --git a/tools/shared.c b/tools/shared.c index ae3287b..962159e 100644 --- a/tools/shared.c +++ b/tools/shared.c @@ -510,11 +510,20 @@ tools_exec_command(const char *prefix, int real_argc, char **real_argv) setup_path(); rc = execvp(executable, argv); - if (rc) - fprintf(stderr, - "Failed to execute '%s' (%s)\n", - command, - strerror(errno)); + if (rc) { + if (errno == ENOENT) { + fprintf(stderr, + "libinput: %s is not a libinput command or not installed. " + "See 'libinput --help'\n", + command); + + } else { + fprintf(stderr, +
libinput: Changes to 'upstream-unstable'
configure.ac|2 include/linux/input-event-codes.h | 838 +++ include/linux/input.h | 859 ++-- meson.build |3 src/Makefile.am |3 src/evdev-mt-touchpad.c | 44 - src/evdev.c | 22 test/Makefile.am|1 test/litest-device-keyboard-all-codes.c |8 test/litest-device-wacom-mobilestudio-pro-pad.c | 126 +++ test/litest.c |2 test/litest.h |1 test/test-lid.c | 78 ++ test/test-pad.c | 31 tools/libinput-debug-events.c |1 15 files changed, 1209 insertions(+), 810 deletions(-) New commits: commit 04287cb3b7bef4c4efb48e646197d190c6ba91ed Author: Peter HuttererDate: Wed Oct 4 12:45:57 2017 +1000 configure.ac: libinput 1.8.3 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index b66a61f..f6e91f4 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [8]) -m4_define([libinput_micro_version], [2]) +m4_define([libinput_micro_version], [3]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) diff --git a/meson.build b/meson.build index 6c4b213..c795ae8 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('libinput', 'c', 'cpp', - version : '1.8.2', + version : '1.8.3', license : 'MIT/Expat', default_options : [ 'c_std=gnu99', 'warning_level=2' ], meson_version : '>= 0.40.0') commit 87556848fffb3f14e9dc782b1364eeb3c59e6c81 Author: Peter Hutterer Date: Wed Oct 4 12:55:51 2017 +1000 Fix make distcheck for missing input-event-codes.h Signed-off-by: Peter Hutterer diff --git a/src/Makefile.am b/src/Makefile.am index 6723d5a..1dec686 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,7 +33,8 @@ libinput_la_SOURCES = \ udev-seat.h \ timer.c \ timer.h \ - ../include/linux/input.h + ../include/linux/input.h\ + ../include/linux/input-event-codes.h libinput_la_LIBADD = $(MTDEV_LIBS) \ $(LIBUDEV_LIBS) \ commit 77231f1aeafdeca14b139ded528b250b92a55726 Author: Peter Hutterer Date: Thu Sep 21 09:08:12 2017 +1000 test: fix the 'all codes' keyboard device The ...create() method returned the wrong device, so this one was never actually used. Once we start using, we get test case failures related to the device having BTN_foo events as well. For now, just disable those codes so we have a keyboard with all keys and pass the tests. The rest needs better fixing. Signed-off-by: Peter Hutterer (cherry picked from commit 4c4d400bcb7794ea7d1c57d02ae6b63ba5dbf406) diff --git a/test/litest-device-keyboard-all-codes.c b/test/litest-device-keyboard-all-codes.c index a3ad468..a0f3aa4 100644 --- a/test/litest-device-keyboard-all-codes.c +++ b/test/litest-device-keyboard-all-codes.c @@ -25,12 +25,13 @@ #include "litest.h" #include "litest-int.h" +#include "libinput-util.h" static void all_codes_create(struct litest_device *d); static void litest_keyboard_all_codes_setup(void) { - struct litest_device *d = litest_create_device(LITEST_KEYBOARD); + struct litest_device *d = litest_create_device(LITEST_KEYBOARD_ALL_CODES); litest_set_current_device(d); } @@ -61,6 +62,11 @@ all_codes_create(struct litest_device *d) int code, idx; for (idx = 0, code = 0; code < KEY_MAX; code++) { + const char *name = libevdev_event_code_get_name(EV_KEY, code); + + if (name && strneq(name, "BTN_", 4)) + continue; + events[idx++] = EV_KEY; events[idx++] = code; } commit 622e891354de6d8bdb46e2bff37471097c71be00 Author: Peter Hutterer Date: Thu Sep 21 09:07:49 2017 +1000 evdev: update key type check for new key defines Signed-off-by: Peter Hutterer (cherry picked from commit 0c6b5c045b4c3799fae6ab210c27726be1105a6a) diff --git a/src/evdev.c b/src/evdev.c index 252958a..b5e05f2 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -790,7 +790,7 @@ get_key_type(uint16_t code) return EVDEV_KEY_TYPE_KEY; if (code >= BTN_DPAD_UP
xserver-xorg-input-libinput: Changes to 'upstream-unstable'
conf/40-libinput.conf |2 - configure.ac |2 - man/libinput.man |8 src/xf86libinput.c| 88 ++ 4 files changed, 78 insertions(+), 22 deletions(-) New commits: commit 2be6487de417473aac85ebd800392cdd8604c4a6 Author: Peter HuttererDate: Fri Sep 15 11:26:54 2017 +1000 xf86-input-libinput 0.26.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index ed1fd83..fda6b3e 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], -[0.25.1], +[0.26.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) commit 6ce3d0249d426e6b3c83e7f86d76bb3145c00a74 Author: Peter Hutterer Date: Mon Jun 26 18:27:10 2017 +1000 Post a motion event before a tablet button down Not all clients update the pointer position correctly from the button events (for historical reasons) so we need to send a motion event before the button event that represents a tip state change. https://bugs.freedesktop.org/show_bug.cgi?id=101588 Signed-off-by: Peter Hutterer diff --git a/src/xf86libinput.c b/src/xf86libinput.c index fa31b78..5727040 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -212,6 +212,10 @@ update_mode_prop(InputInfoPtr pInfo, static enum event_handling xf86libinput_handle_event(struct libinput_event *event); +static void +xf86libinput_post_tablet_motion(InputInfoPtr pInfo, + struct libinput_event_tablet_tool *event); + static inline int use_server_fd(const InputInfoPtr pInfo) { return pInfo->fd > -1 && (pInfo->flags & XI86_SERVER_FD); @@ -1716,12 +1720,15 @@ static enum event_handling xf86libinput_handle_tablet_tip(InputInfoPtr pInfo, struct libinput_event_tablet_tool *event) { + DeviceIntPtr pDev = pInfo->dev; enum libinput_tablet_tool_tip_state state; const BOOL is_absolute = TRUE; if (xf86libinput_tool_queue_event(event)) return EVENT_QUEUED; + xf86libinput_post_tablet_motion(pDev->public.devicePrivate, event); + state = libinput_event_tablet_tool_get_tip_state(event); xf86PostButtonEventP(pInfo->dev, commit 87f9fe3a6fafe60134c69419c0e551b9dbc112b7 Author: Peter Hutterer Date: Wed May 24 08:42:02 2017 +1000 Only initialize properties that match capabilities on a subdevice If a device is split into multiple subdevices, usually pointer+keyboard, we initialized properties matching the libinput device on both devices. This results in the keyboard having e.g. a Accel Speed or Left Handed settings even though it cannot send any events of that type. Filter by capabilities on the subdevice so we only get those properties that match the subdevice's capabilities. https://bugs.freedesktop.org/show_bug.cgi?id=100900 Signed-off-by: Peter Hutterer diff --git a/src/xf86libinput.c b/src/xf86libinput.c index 8e63fd6..fa31b78 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -5231,6 +5231,19 @@ LibinputInitTabletAreaRatioProperty(DeviceIntPtr dev, 2, data); } +static inline bool +subdevice_filter_for_capabilities(DeviceIntPtr dev, + uint32_t capabilities) +{ + InputInfoPtr pInfo = dev->public.devicePrivate; + struct xf86libinput *driver_data = pInfo->private; + + if (!xf86libinput_is_subdevice(pInfo)) + return false; + + return !(driver_data->capabilities & capabilities); +} + static void LibinputInitProperty(DeviceIntPtr dev) { @@ -5243,21 +5256,35 @@ LibinputInitProperty(DeviceIntPtr dev) prop_float = XIGetKnownProperty("FLOAT"); - LibinputInitTapProperty(dev, driver_data, device); - LibinputInitTapDragProperty(dev, driver_data, device); - LibinputInitTapDragLockProperty(dev, driver_data, device); - LibinputInitTapButtonmapProperty(dev, driver_data, device); - LibinputInitCalibrationProperty(dev, driver_data, device); - LibinputInitAccelProperty(dev, driver_data, device); - LibinputInitNaturalScrollProperty(dev, driver_data, device); + /* On a subdevice, we likely only have a keyboard, so filter out the +* properties for the capabilities we don't have */ + if (!subdevice_filter_for_capabilities(dev, CAP_POINTER|CAP_TOUCH)) { + LibinputInitTapProperty(dev, driver_data, device); + LibinputInitTapDragProperty(dev, driver_data, device); + LibinputInitTapDragLockProperty(dev, driver_data,
libinput: Changes to 'upstream-unstable'
circle.yml | 151 +++ configure.ac |2 doc/building.dox | 20 +++ meson.build | 48 +--- src/evdev-lid.c |8 + src/evdev-mt-touchpad-gestures.c |7 + src/evdev-mt-touchpad.c |7 - src/evdev.c | 20 +-- src/timer.c | 18 ++- test/Makefile.am |1 test/litest-device-gpio-keys.c | 75 + test/litest.c|2 test/litest.h|1 test/test-gestures.c | 211 --- test/test-lid.c | 20 +++ test/test-pointer.c | 35 ++ test/test-touchpad.c | 42 +++ test/valgrind.suppressions |7 + tools/Makefile.am|2 19 files changed, 425 insertions(+), 252 deletions(-) New commits: commit 0df61c76fe08040f90bb8f916944e938d07975de Author: Peter HuttererDate: Thu Sep 7 10:43:30 2017 +1000 configure.ac: libinput 1.8.2 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 37b6f42..b66a61f 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [8]) -m4_define([libinput_micro_version], [1]) +m4_define([libinput_micro_version], [2]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) diff --git a/meson.build b/meson.build index 93a20d5..4cb83dd 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('libinput', 'c', 'cpp', - version : '1.8.1', + version : '1.8.2', license : 'MIT/Expat', default_options : [ 'c_std=gnu99', 'warning_level=2' ], meson_version : '>= 0.40.0') commit 05c287c16cee05be7713c060d65c5e004f1b8f19 Author: Peter Hutterer Date: Thu Sep 7 16:54:22 2017 +1000 test: add the gpio-keys device to the Makefile Fixes distcheck Signed-off-by: Peter Hutterer diff --git a/test/Makefile.am b/test/Makefile.am index 5cb89a6..700ae69 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -29,6 +29,7 @@ liblitest_la_SOURCES = \ litest-device-cyborg-rat-5.c \ litest-device-elantech-touchpad.c \ litest-device-generic-singletouch.c \ + litest-device-gpio-keys.c \ litest-device-huion-pentablet.c \ litest-device-keyboard.c \ litest-device-keyboard-all-codes.c \ commit 3d83026c37a9c87582725c14eea2b2183c279db4 Author: Peter Hutterer Date: Sat Jul 29 13:59:40 2017 +0100 gestures: don't try to pinch for nfingers > slots We don't know the position of the third finger on 2-slot touchpads, differing between swipe and pinch is reliable. Simply disable 3-finger pinch and always use swipe; 3fg pinch is uncommon anyway and it's better to have one of the gestures working reliably than both unreliably. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede (cherry picked from commit 6d435cda0679a271ba8e174c3cd0ca41ffe4f03c) diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c index a20b26d..26bdef5 100644 --- a/src/evdev-mt-touchpad-gestures.c +++ b/src/evdev-mt-touchpad-gestures.c @@ -334,6 +334,10 @@ tp_gesture_handle_state_unknown(struct tp_dispatch *tp, uint64_t time) if (tp->gesture.finger_count == 2) { tp_gesture_set_scroll_buildup(tp); return GESTURE_STATE_SCROLL; + /* more fingers than slots, don't bother with pinch, always +* assume swipe */ + } else if (tp->gesture.finger_count > tp->num_slots) { + return GESTURE_STATE_SWIPE; } /* for 3+ finger gestures, check if one finger is > 20mm @@ -356,7 +360,8 @@ tp_gesture_handle_state_unknown(struct tp_dispatch *tp, uint64_t time) /* If both touches are moving in the same direction assume * scroll or swipe */ - if (tp_gesture_same_directions(dir1, dir2)) { + if (tp->gesture.finger_count > tp->num_slots || + tp_gesture_same_directions(dir1, dir2)) { if (tp->gesture.finger_count == 2) { tp_gesture_set_scroll_buildup(tp); return GESTURE_STATE_SCROLL; diff --git a/test/test-gestures.c b/test/test-gestures.c index ce1012d..e95d1a0 100644 --- a/test/test-gestures.c +++ b/test/test-gestures.c @@ -754,110 +754,6 @@ START_TEST(gestures_pinch_3fg) } END_TEST -START_TEST(gestures_pinch_3fg_btntool) -{ - struct litest_device *dev =
libinput: Changes to 'upstream-unstable'
Rebased ref, commits from common ancestor: commit 401728a1574ef886ddb7fa19cd8ed196420d7931 Author: Peter HuttererDate: Mon Jul 3 15:07:20 2017 +1000 configure.ac: libinput 1.8.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index a66371c..eabc9e1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) -m4_define([libinput_minor_version], [7]) -m4_define([libinput_micro_version], [902]) +m4_define([libinput_minor_version], [8]) +m4_define([libinput_micro_version], [0]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) diff --git a/meson.build b/meson.build index bc63971..5ee1520 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('libinput', 'c', 'cpp', - version : '1.7.902', + version : '1.8.0', license : 'MIT/Expat', default_options : [ 'c_std=gnu99', 'warning_level=2' ], meson_version : '>= 0.40.0') commit 945122c6919a00dbb6fcd5c0ad17736f1c23d410 Author: Peter Hutterer Date: Mon Jul 3 13:33:20 2017 +1000 tools: tidy up the libinput man pages again Make the libinput page more generic but suitable for short attention spans and most importantly, point to the xf86-input-libinput man page in a more obvious manner since we're now shadowing that. The rest of the man pages have punctuation and formatting cleanups only. Signed-off-by: Peter Hutterer diff --git a/tools/libinput-debug-events.man b/tools/libinput-debug-events.man index ac16d57..473e064 100644 --- a/tools/libinput-debug-events.man +++ b/tools/libinput-debug-events.man @@ -2,7 +2,7 @@ .SH NAME libinput\-debug\-events \- debug helper for libinput .SH SYNOPSIS -libinput debug\-events [\-\-help] [\-\-show\-keycodes] [\-\-udev |\-\-device /dev/input/event0] [configuration options] +.B libinput debug\-events [\-\-help] [\-\-show\-keycodes] [\-\-udev \fI\fB|\-\-device \fI/dev/input/event0\fB] \fI[configuration options]\fB .SH DESCRIPTION .PP The @@ -16,8 +16,8 @@ This tool usually needs to be run as root to have access to the /dev/input/eventX nodes. .SH OPTIONS .TP 8 -.B \-\-device /dev/input/event0 -Use the given device with the path backend. +.B \-\-device \fI/dev/input/event0\fR +Use the given device with the path backend .TP 8 .B \-\-grab Exclusively grab all opened devices. This will prevent events from being @@ -36,7 +36,7 @@ and other sensitive information showing up in the output. Use the .B \-\-show\-keycodes argument to make all keycodes visible. .TP 8 -.B \-\-udev +.B \-\-udev \fI\fR Use the udev backend to listen for device notifications on the given seat. The default behavior is equivalent to \-\-udev "seat0". .TP 8 @@ -45,40 +45,40 @@ Use verbose output .SS libinput configuration options .TP 8 .B \-\-enable\-tap|\-\-disable\-tap -Enable or disable tap-to-click. +Enable or disable tap-to-click .TP 8 .B \-\-enable-drag|\-\-disable\-drag Enable or disable tap-and-drag .TP 8 .B \-\-enable\-drag-lock|\-\-disable\-drag\-lock -Enable or disable tap-and-drag. +Enable or disable tap-and-drag .TP 8 .B \-\-enable\-natural\-scrolling|\-\-disable\-natural\-scrolling -Enable or disable natural scrolling. +Enable or disable natural scrolling .TP 8 .B \-\-enable\-left\-handed|\-\-disable\-left\-handed -Enable or disable left handed button configuration. +Enable or disable left handed button configuration .TP 8 .B \-\-enable\-dwt|\-\-disable\-dwt -Enable or disable disable-while-typing. +Enable or disable disable-while-typing .TP 8 .B \-\-set\-click\-method=[none|clickfinger|buttons] Set the desired click method .TP 8 .B \-\-set\-scroll\-method=[none|twofinger|edge|button] -Set the desired scroll method. +Set the desired scroll method .TP 8 .B \-\-set\-scroll\-button=BTN_MIDDLE -Set the button to the given button code. +Set the button to the given button code .TP 8 .B \-\-set\-profile=[adaptive|flat] -Set pointer acceleration profile. +Set pointer acceleration profile .TP 8 .B \-\-set\-speed= Set pointer acceleration speed. The allowed range is [-1, 1]. .TP 8 .B \-\-set\-tap\-map=[lrm|lmr] -Set button mapping for tapping. +Set button mapping for tapping .SH NOTES .PP Events shown by this tool may not correspond to the events seen by a diff --git a/tools/libinput-debug-gui.man b/tools/libinput-debug-gui.man index de6a67a..f205377 100644 --- a/tools/libinput-debug-gui.man +++ b/tools/libinput-debug-gui.man @@ -2,7 +2,7 @@ .SH NAME libinput\-debug\-gui \- visual debug helper for libinput .SH SYNOPSIS -.B libinput debug\-gui [\-\-help] [\-\-udev |\-\-device /dev/input/event0] [configuration options] +.B libinput debug\-gui [\-\-help] [\-\-udev \fI\fB|\-\-device \fI/dev/input/event0\fB] \fI[configuration options]\fB .SH
libinput: Changes to 'upstream-unstable'
configure.ac|4 +-- src/evdev-lid.c | 21 -- src/evdev-mt-touchpad.c | 17 ++ src/libinput-util.h |8 -- test/test-lid.c | 56 test/test-touchpad.c|8 +++--- 6 files changed, 90 insertions(+), 24 deletions(-) New commits: commit faf1a7b315e3292d78e6877a5c182fdd501918cf Author: Peter HuttererDate: Fri Jun 9 10:12:05 2017 +1000 configure.ac: libinput 1.7.3 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 04c0755..51bd5a7 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [7]) -m4_define([libinput_micro_version], [2]) +m4_define([libinput_micro_version], [3]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -36,7 +36,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=22:4:12 +LIBINPUT_LT_VERSION=22:5:12 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 183b67b69dc6a83cd8edc6c74550922af6509626 Author: Peter Hutterer Date: Tue May 9 15:07:20 2017 +1000 touchpad: pull the tap exclusion zone down to the full edge zone This was originally left outside of the button areas in case users tap in those zones, but we're getting false tap events in that zone. On a 100mm touchpad, the edge zone is merely 5mm, it's acceptable to ignore taps in that area even in the software button. We can revisit this if we see tap detection failures in the future. https://bugzilla.redhat.com/show_bug.cgi?id=1415796 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede (cherry picked from commit 211bed2c25e4282820e5155191d4dc09201f1210) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 73f0fdd..cf9a511 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -544,15 +544,8 @@ tp_palm_tap_is_palm(const struct tp_dispatch *tp, const struct tp_touch *t) t->point.x < tp->palm.right_edge) return false; - /* We're inside the left/right palm edge and not in one of the -* software button areas */ - if (t->point.y < tp->buttons.bottom_area.top_edge) { - evdev_log_debug(tp->device, - "palm: palm-tap detected\n"); - return true; - } - - return false; + evdev_log_debug(tp->device, "palm: palm-tap detected\n"); + return true; } static bool diff --git a/test/test-touchpad.c b/test/test-touchpad.c index c0de99b..ecbdc43 100644 --- a/test/test-touchpad.c +++ b/test/test-touchpad.c @@ -1176,15 +1176,15 @@ START_TEST(touchpad_palm_detect_tap_softbuttons) litest_drain_events(li); - litest_touch_down(dev, 0, 95, 5); + litest_touch_down(dev, 0, 99, 99); litest_touch_up(dev, 0); litest_assert_empty_queue(li); - litest_touch_down(dev, 0, 5, 5); + litest_touch_down(dev, 0, 1, 99); litest_touch_up(dev, 0); litest_assert_empty_queue(li); - litest_touch_down(dev, 0, 5, 99); + litest_touch_down(dev, 0, 10, 99); litest_touch_up(dev, 0); litest_assert_button_event(li, BTN_LEFT, @@ -1194,7 +1194,7 @@ START_TEST(touchpad_palm_detect_tap_softbuttons) LIBINPUT_BUTTON_STATE_RELEASED); litest_assert_empty_queue(li); - litest_touch_down(dev, 0, 95, 99); + litest_touch_down(dev, 0, 90, 99); litest_touch_up(dev, 0); litest_assert_button_event(li, BTN_LEFT, commit a17c579d4eb7fa5e7451f73c454d638f4949aa3d Author: Peter Hutterer Date: Wed May 10 12:33:10 2017 +1000 util: fix container_of() macro Fixes a bunch of warnings of the kind ../src/evdev.h:378:32: warning: variable 'f' is uninitialized when used here [-Wuninitialized] return container_of(dispatch, f, base); Just typecasting NULL means we can ignore sample but for the type. https://bugs.freedesktop.org/show_bug.cgi?id=100976 Signed-off-by: Peter Hutterer Reviewed-by: Armin Krezović Tested-by: Armin Krezović Reviewed-by: Eric Engestrom (cherry picked from commit 3925936969e993709c832731343ace3ff5e695d0) diff --git
libinput: Changes to 'upstream-unstable'
Rebased ref, commits from common ancestor: commit 4d6545a6a164a24228042708852e851d41f3bef8 Author: Peter HuttererDate: Fri May 5 14:51:59 2017 +1000 configure.ac: libinput 1.7.2 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index c517593..04c0755 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [7]) -m4_define([libinput_micro_version], [1]) +m4_define([libinput_micro_version], [2]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -36,7 +36,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=22:3:12 +LIBINPUT_LT_VERSION=22:4:12 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 4ab9c15cac163e27f2b92726019c165eaecb7451 Author: Paul Kocialkowski Date: Fri Apr 28 15:29:04 2017 +0200 udev: Add specific pressure range for the ASUS ZenBook UX21E This adds specific pressure range values for the Elantech touchpad found in the ASUS ZenBook UX21E. https://bugs.freedesktop.org/show_bug.cgi?id=99975 Signed-off-by: Paul Kocialkowski Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer (cherry picked from commit 46af543b49b4e2d75348c715d1c76c2e0d432514) diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index 73734e6..560e77a 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -87,6 +87,9 @@ libinput:name:*ETPS/2 Elantech Touchpad*:dmi:* LIBINPUT_ATTR_RESOLUTION_HINT=31x31 LIBINPUT_ATTR_PRESSURE_RANGE=10:8 +libinput:name:*ETPS/2 Elantech Touchpad*:dmi:*svnASUSTeKComputerInc.:pnUX21E:* + LIBINPUT_ATTR_PRESSURE_RANGE=24:10 + ## # Google ## commit 17692e5d24870e384f40ba95197396d868ab2b8b Author: Paul Kocialkowski Date: Fri Apr 28 15:29:03 2017 +0200 udev: Select more generic pressure range values for Elantech touchpads The current pressure values for Elantech touchpads are too high for various devices and make the touchpad almost unusable on them. Decreasing the pressure range values makes those devices usable again. Signed-off-by: Paul Kocialkowski Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer (cherry picked from commit 1dfedc6995cf63e004bd3e0b1d22ae263feb7362) diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index eaa9345..73734e6 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -85,7 +85,7 @@ libinput:name:* Touchpad:dmi:*svnDellInc.:* ## libinput:name:*ETPS/2 Elantech Touchpad*:dmi:* LIBINPUT_ATTR_RESOLUTION_HINT=31x31 - LIBINPUT_ATTR_PRESSURE_RANGE=24:10 + LIBINPUT_ATTR_PRESSURE_RANGE=10:8 ## # Google commit c24abedeb4d5fc0245dfcd7e3eed3561f5767b11 Author: Paul Kocialkowski Date: Fri Apr 28 15:29:02 2017 +0200 udev: Remove unused Elantech touchpad model binding The Elantech touchpad model binding in udev is currently unused, since pressure values were moved to a udev binding of their own. This gets rid of the deprecated model binding. Signed-off-by: Paul Kocialkowski Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer (cherry picked from commit 6af9f8e5fbb9f5588eeb51185d2cc0d7f93d34ee) diff --git a/src/evdev.c b/src/evdev.c index 2d18bed..3b4bc4b 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2245,7 +2245,6 @@ evdev_read_model_flags(struct evdev_device *device) MODEL(ALPS_TOUCHPAD), MODEL(SYNAPTICS_SERIAL_TOUCHPAD), MODEL(JUMPING_SEMI_MT), - MODEL(ELANTECH_TOUCHPAD), MODEL(APPLE_INTERNAL_KEYBOARD), MODEL(CYBORG_RAT), MODEL(CYAPA), diff --git a/src/evdev.h b/src/evdev.h index 465b8a3..c9a44f8 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -111,7 +111,6 @@ enum evdev_device_model { EVDEV_MODEL_ALPS_TOUCHPAD = (1 << 8), EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD = (1 << 9), EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10), - EVDEV_MODEL_ELANTECH_TOUCHPAD = (1 << 11), EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 <<
libinput: Changes to 'upstream-unstable'
Rebased ref, commits from common ancestor: commit b2325b33fc0e9b4bb1d35ba5d125c66f448b9b14 Author: Peter HuttererDate: Wed Mar 8 17:02:29 2017 +1000 configure.ac: libinput 1.6.3 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 98877aa..1747834 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [6]) -m4_define([libinput_micro_version], [2]) +m4_define([libinput_micro_version], [3]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=21:4:11 +LIBINPUT_LT_VERSION=21:5:11 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 4e1610a28650f813b01cfca859e2a57ce5f20b08 Author: Peter Hutterer Date: Wed Mar 1 11:26:06 2017 +1000 touchpad: ignore hovering touches for the software button state If a touch started hovering in the main area, the button state would start with AREA and never move to the real button state, despite the finger triggering the pressure thresholds correctly in one of the areas. This could even happen across touch sequences if a touch went below pressure in the software button area, it changed to hovering and the button state changed to NONE. On the next event, the touch is still hovering and the current position of the touch is taken for the button state machine. https://bugs.freedesktop.org/show_bug.cgi?id=99976 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede (cherry picked from commit c0dbd6eb38c000ebe10c25d07152bb6154bcc73e) diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c index 3cd118c..b7989f4 100644 --- a/src/evdev-mt-touchpad-buttons.c +++ b/src/evdev-mt-touchpad-buttons.c @@ -458,7 +458,7 @@ tp_button_handle_state(struct tp_dispatch *tp, uint64_t time) struct tp_touch *t; tp_for_each_touch(tp, t) { - if (t->state == TOUCH_NONE) + if (t->state == TOUCH_NONE || t->state == TOUCH_HOVERING) continue; if (t->state == TOUCH_END) { diff --git a/test/test-touchpad-buttons.c b/test/test-touchpad-buttons.c index 63d02f2..cf9678a 100644 --- a/test/test-touchpad-buttons.c +++ b/test/test-touchpad-buttons.c @@ -1476,6 +1476,37 @@ START_TEST(clickpad_softbutton_right_to_left) } END_TEST +START_TEST(clickpad_softbutton_hover_into_buttons) +{ + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; + + litest_drain_events(li); + + litest_hover_start(dev, 0, 50, 50); + libinput_dispatch(li); + litest_hover_move_to(dev, 0, 50, 50, 90, 90, 10, 0); + libinput_dispatch(li); + + litest_touch_move_to(dev, 0, 90, 90, 91, 91, 1, 0); + + litest_button_click(dev, BTN_LEFT, true); + libinput_dispatch(li); + + litest_assert_button_event(li, + BTN_RIGHT, + LIBINPUT_BUTTON_STATE_PRESSED); + litest_assert_empty_queue(li); + + litest_button_click(dev, BTN_LEFT, false); + litest_touch_up(dev, 0); + + litest_assert_button_event(li, + BTN_RIGHT, + LIBINPUT_BUTTON_STATE_RELEASED); +} +END_TEST + START_TEST(clickpad_topsoftbuttons_left) { struct litest_device *dev = litest_current_device(); @@ -1961,6 +1992,7 @@ litest_setup_tests_touchpad_buttons(void) litest_add("touchpad:softbutton", clickpad_softbutton_left_2nd_fg_move, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); litest_add("touchpad:softbutton", clickpad_softbutton_left_to_right, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); litest_add("touchpad:softbutton", clickpad_softbutton_right_to_left, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD); + litest_add("touchpad:softbutton", clickpad_softbutton_hover_into_buttons, LITEST_CLICKPAD|LITEST_HOVER, LITEST_APPLE_CLICKPAD); litest_add("touchpad:topsoftbuttons", clickpad_topsoftbuttons_left, LITEST_TOPBUTTONPAD, LITEST_ANY); litest_add("touchpad:topsoftbuttons", clickpad_topsoftbuttons_right, LITEST_TOPBUTTONPAD, LITEST_ANY); commit 8dea77ff493b8cf730fe08dd4508444ccdb90309 Author: Peter Hutterer Date: Tue Feb 28 16:44:17 2017 +1000 tools: fix printing of tablet coordinates Signed-off-by: Peter Hutterer (cherry
xserver-xorg-input-libinput: Changes to 'upstream-unstable'
autogen.sh| 11 configure.ac |2 include/libinput-properties.h | 10 man/libinput.man | 60 src/Makefile.am |5 src/bezier.c | 177 src/bezier.h | 69 src/xf86libinput.c| 616 ++ test/Makefile.am |5 test/test-bezier.c| 206 ++ 10 files changed, 1095 insertions(+), 66 deletions(-) New commits: commit 153a7fc62fa87a2cc2516826b3eae16fa8cc861d Author: Peter HuttererDate: Thu Mar 9 15:58:39 2017 +1000 xf86-input-libinput 0.25.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index d6d7d34..268fda3 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], -[0.24.0], +[0.25.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) commit 72fb6d304eec6eeeac6b42963c2729134d56de57 Author: Peter Hutterer Date: Tue Feb 28 14:45:29 2017 +1000 test: fix a test failure on ppc64(le) and aarch64 Caused by different results in -O0 vs -O2. The resulting array differs only slightly but the initial sequence has one extra zero. That triggers our assert, no other compiler flag seem to be affecting this. Compiled with -O0: Breakpoint 1, test_nonzero_x_linear () at test-bezier.c:157 157 assert(bezier[x] > bezier[x-1]); (gdb) p bezier $6 = {0 , 1, 2, 4, 5, 7, 9, 10, 12, 14, 15, 17, 19, 21, 22, Compiled with -O2: (gdb) p bezier $1 = {0 , 1, 3, 5, 7, 9, 10, 12, 14, 15, 17, 19, 20, 22, Printing of the temporary numbers in the decasteljau function shows that a few of them are off by one, e.g. 408.530612/0.836735 with O0, but 409.510204/0.836735 with O2 Note: these are not rounding errors caused by the code, the cast to int happens afterwards. Hack around this by allowing for one extra zero before we check that the rest of the curve is ascending again. https://bugs.freedesktop.org/show_bug.cgi?id=2 Signed-off-by: Peter Hutterer diff --git a/test/test-bezier.c b/test/test-bezier.c index 1b290a4..9a6e59e 100644 --- a/test/test-bezier.c +++ b/test/test-bezier.c @@ -153,6 +153,13 @@ test_nonzero_x_linear(void) assert(bezier[x] == 0); } while (++x < size * 0.2 - 1); + /* ppc64le, ppc64, aarch64 have different math results at -O2, + resulting in one extra zero at the beginning of the array. + some other numbers are different too but within the error + margin (#2) */ + if (bezier[x] == 0) + x++; + do { assert(bezier[x] > bezier[x-1]); } while (++x < size * 0.8 - 1); commit aae2c8ad9a9f1712149c93d50284ddb5f37e4cbd Author: Peter Hutterer Date: Fri Feb 24 12:56:41 2017 +1000 Open sysfs files directly instead of going through the server Only use-case here are pad mode LEDs that now live in /sys/class/leds. Asking the server to open them is pointless, the server only knows how to open Option "Device". And since the LEDs are in sysfs we should have access to them anyway, so no need for jumping through or hula-ing hoops. xf86CloseSerial() works as intended as it's a slim wrapper around close(), so we only have to worry about the open() path here. Signed-off-by: Peter Hutterer diff --git a/src/xf86libinput.c b/src/xf86libinput.c index ef03d3e..888c8f2 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -2187,6 +2187,12 @@ open_restricted(const char *path, int flags, void *data) InputInfoPtr pInfo; int fd = -1; + /* Special handling for sysfs files (used for pad LEDs) */ + if (strneq(path, "/sys/", 5)) { + fd = open(path, flags); + return fd < 0 ? -errno : fd; + } + nt_list_for_each_entry(pInfo, xf86FirstLocalDevice(), next) { char *device = xf86CheckStrOption(pInfo->options, "Device", NULL); commit dafc296f2df587a1bb5feb37697c50608db4f246 Author: Peter Hutterer Date: Fri Feb 24 12:34:10 2017 +1000 Add streq() macro, replace strcmp instances with it And why isn't this a thing in glibc yet Signed-off-by: Peter Hutterer Reviewed-by: Eric Engestrom diff --git a/src/xf86libinput.c b/src/xf86libinput.c index e6b9921..ef03d3e 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -65,6 +65,9 @@ #define
libinput: Changes to 'upstream-unstable'
configure.ac |6 doc/faqs.dox | 22 - src/evdev-mt-touchpad-buttons.c | 19 - src/evdev-mt-touchpad-tap.c | 10 src/evdev-mt-touchpad.c |6 src/evdev-tablet-pad-leds.c | 488 ++- src/evdev.c |3 src/evdev.h |3 src/libinput-util.h |1 src/libinput.h | 16 test/Makefile.am |1 test/litest-device-apple-appletouch.c| 115 ++ test/litest-device-mouse-wheel-click-angle.c |2 test/litest-device-waltop-tablet.c |2 test/litest.c|2 test/litest.h|1 test/test-pointer.c |6 test/test-touchpad-buttons.c | 113 ++ test/test-touchpad.c | 48 ++ tools/event-debug.c | 20 - tools/shared.c |7 tools/shared.h |3 udev/90-libinput-model-quirks.hwdb |3 23 files changed, 851 insertions(+), 46 deletions(-) New commits: commit 7942aa51ad2047d5baa9a2efb4bb2ce0ec0e21e0 Author: Peter HuttererDate: Tue Feb 21 11:34:39 2017 +1000 configure.ac: libinput 1.6.2 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 845756b..98877aa 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [6]) -m4_define([libinput_micro_version], [1]) +m4_define([libinput_micro_version], [2]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=21:3:11 +LIBINPUT_LT_VERSION=21:4:11 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 005efbf843faf4a0fac29887807310d903b7b75a Author: Peter Hutterer Date: Tue Feb 21 09:21:56 2017 +1000 Add the matching @see tags to the accel config Signed-off-by: Peter Hutterer (cherry picked from commit c5d9ecbdae6251965341f932a7107e069f1b23a3) diff --git a/src/libinput.h b/src/libinput.h index 86bfeaf..b4a890f 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -4246,6 +4246,10 @@ libinput_device_config_send_events_get_default_mode(struct libinput_device *devi * @param device The device to configure * * @return 0 if the device is not accelerated, nonzero if it is accelerated + * + * @see libinput_device_config_accel_set_speed + * @see libinput_device_config_accel_get_speed + * @see libinput_device_config_accel_get_default_speed */ int libinput_device_config_accel_is_available(struct libinput_device *device); @@ -4265,6 +4269,10 @@ libinput_device_config_accel_is_available(struct libinput_device *device); * @param speed The normalized speed, in a range of [-1, 1] * * @return A config status code + * + * @see libinput_device_config_accel_is_available + * @see libinput_device_config_accel_get_speed + * @see libinput_device_config_accel_get_default_speed */ enum libinput_config_status libinput_device_config_accel_set_speed(struct libinput_device *device, @@ -4280,6 +4288,10 @@ libinput_device_config_accel_set_speed(struct libinput_device *device, * @param device The device to configure * * @return The current speed, range -1 to 1 + * + * @see libinput_device_config_accel_is_available + * @see libinput_device_config_accel_set_speed + * @see libinput_device_config_accel_get_default_speed */ double libinput_device_config_accel_get_speed(struct libinput_device *device); @@ -4293,6 +4305,10 @@ libinput_device_config_accel_get_speed(struct libinput_device *device); * * @param device The device to configure * @return The default speed setting for this device. + * + * @see libinput_device_config_accel_is_available + * @see libinput_device_config_accel_set_speed + * @see libinput_device_config_accel_get_speed */ double libinput_device_config_accel_get_default_speed(struct libinput_device *device); commit ca416f94d781eda8816f17895c83c286d557fa2e Author: Peter Hutterer Date: Tue Feb 21 10:10:18 2017 +1000 tools: print the key as -1 for obfuscated keys Missing from 8c1aa1de where we hid the human-readable parts but the keycode itself is still enough information to recover the typed bits.
libinput: Changes to 'upstream-unstable'
.gitignore |2 configure.ac |6 doc/pointer-acceleration.dox |9 doc/svg/ptraccel-touchpad.svg | 1971 +- src/Makefile.am|4 src/evdev-mt-touchpad-gestures.c |6 src/evdev-mt-touchpad-tap.c| 16 src/evdev-mt-touchpad.c| 122 src/evdev-mt-touchpad.h| 11 src/evdev-tablet.c | 13 src/evdev.c| 56 src/evdev.h| 92 src/filter-private.h |4 src/filter.c | 423 +- src/filter.h | 25 src/libinput-private.h | 50 src/libinput-util.c| 28 src/libinput.h | 32 src/path-seat.c| 385 + src/path-seat.h| 47 src/path.c | 385 - src/path.h | 47 src/udev-seat.c|5 test/Makefile.am | 58 test/device.c | 1535 --- test/gestures.c| 1241 -- test/keyboard.c| 392 -- test/litest-device-alps-dualpoint.c|2 test/litest-device-alps-semi-mt.c |2 test/litest-device-anker-mouse-kbd.c |2 test/litest-device-apple-internal-keyboard.c |2 test/litest-device-apple-magicmouse.c |2 test/litest-device-asus-rog-gladius.c |2 test/litest-device-atmel-hover.c |2 test/litest-device-bcm5974.c |2 test/litest-device-calibrated-touchscreen.c| 101 test/litest-device-cyborg-rat-5.c |2 test/litest-device-elantech-touchpad.c |2 test/litest-device-generic-singletouch.c |2 test/litest-device-huion-pentablet.c | 35 test/litest-device-keyboard-all-codes.c|2 test/litest-device-keyboard-razer-blackwidow.c |2 test/litest-device-keyboard.c |2 test/litest-device-logitech-trackball.c|2 test/litest-device-magic-trackpad.c|2 test/litest-device-mouse-low-dpi.c |2 test/litest-device-mouse-roccat.c |2 test/litest-device-mouse-wheel-click-angle.c |2 test/litest-device-mouse-wheel-click-count.c |2 test/litest-device-mouse.c |2 test/litest-device-ms-surface-cover.c |2 test/litest-device-nexus4-touch-screen.c |2 test/litest-device-protocol-a-touch-screen.c |2 test/litest-device-qemu-usb-tablet.c |2 test/litest-device-synaptics-hover.c |2 test/litest-device-synaptics-i2c.c |2 test/litest-device-synaptics-rmi4.c| 132 test/litest-device-synaptics-st.c |2 test/litest-device-synaptics-t440.c|2 test/litest-device-synaptics-x1-carbon-3rd.c |2 test/litest-device-synaptics.c |2 test/litest-device-touch-screen.c |2 test/litest-device-touchscreen-fuzz.c |2 test/litest-device-trackpoint.c|2 test/litest-device-vmware-virtual-usb-mouse.c |2 test/litest-device-wacom-bamboo-16fg-pen.c | 118 test/litest-device-wacom-bamboo-tablet.c | 119 test/litest-device-wacom-cintiq-12wx-pen.c | 157 test/litest-device-wacom-cintiq-13hdt-finger.c | 35 test/litest-device-wacom-cintiq-13hdt-pad.c| 35 test/litest-device-wacom-cintiq-13hdt-pen.c| 35 test/litest-device-wacom-cintiq-24hd-pen.c | 146 test/litest-device-wacom-cintiq-24hd.c | 147 test/litest-device-wacom-cintiq-24hdt-pad.c| 35 test/litest-device-wacom-cintiq-tablet.c | 158 test/litest-device-wacom-ekr.c | 35 test/litest-device-wacom-hid4800-pen.c | 35 test/litest-device-wacom-intuos-finger.c | 114 test/litest-device-wacom-intuos-tablet.c | 173 test/litest-device-wacom-intuos3-pad.c | 35 test/litest-device-wacom-intuos5-finger.c | 112 test/litest-device-wacom-intuos5-pad.c | 35 test/litest-device-wacom-intuos5-pen.c | 172 test/litest-device-wacom-isdv4-e6-finger.c | 97 test/litest-device-wacom-isdv4-e6-pen.c| 111 test/litest-device-wacom-isdv4-tablet.c| 112 test/litest-device-wacom-touch.c | 99 test/litest-device-waltop-tablet.c | 46 test/litest-device-wheel-only.c
libinput: Changes to 'upstream-unstable'
configure.ac |4 src/evdev-mt-touchpad-buttons.c |4 src/evdev-mt-touchpad-gestures.c | 14 +- src/evdev-mt-touchpad.c | 13 + src/evdev.c |2 src/evdev.h |2 src/libinput-util.h |1 src/libinput.c|2 test/Makefile.am |2 test/device.c | 20 ++ test/litest-device-acer-hawaii-keyboard.c | 208 ++ test/litest-device-acer-hawaii-touchpad.c | 113 test/litest-device-alps-dualpoint.c |2 test/litest-device-magic-trackpad.c | 11 + test/litest-device-synaptics-i2c.c|2 test/litest.c |4 test/litest.h |2 test/touchpad.c | 57 +++- tools/ptraccel-debug.c| 11 + tools/shared.c|2 udev/90-libinput-model-quirks.hwdb|8 + 21 files changed, 454 insertions(+), 30 deletions(-) New commits: commit 73b39cee3baa7d284153d8fa0d6f8c387b39f289 Author: Peter HuttererDate: Fri Jan 13 17:39:11 2017 +1000 configure.ac: libinput 1.5.4 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index b30a6fd..9f5ef6a 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [5]) -m4_define([libinput_micro_version], [3]) +m4_define([libinput_micro_version], [4]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=20:4:10 +LIBINPUT_LT_VERSION=20:5:10 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 089ab53e8a40ac58559c2ab50baf57dd45091346 Author: Peter Hutterer Date: Tue Jan 10 08:20:52 2017 +1000 udev: mark Asus X555LAB as touchpad with visible marker https://bugs.freedesktop.org/show_bug.cgi?id=99200 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede (cherry picked from commit 72e01485c0161e8382546c4f0edbb8a3317d0207) diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index e467e59..04bdf9a 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -42,6 +42,12 @@ libinput:mouse:input:b0005v05ACp030D* LIBINPUT_MODEL_APPLE_MAGICMOUSE=1 ## +# Asus +## +libinput:name:*ETPS/2 Elantech Touchpad*:dmi:*svnASUSTeKCOMPUTERINC.:pnX555LAB:* + LIBINPUT_MODEL_TOUCHPAD_VISIBLE_MARKER=1 + +## # Cyborg ## # Saitek Cyborg R.A.T.5 Mouse commit aee85d3d425fb31431fe19b68df0f34ca393ef38 Author: Peter Hutterer Date: Mon Jan 9 11:27:06 2017 +1000 touchpad: add a model tag to mark touchpads with visible marker We used to mark dell touchpads this way but let's make this more generic. Nothing else used the dell touchpad model flag, so we can simply replace it. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede (cherry picked from commit 43ba2dbb30b33f2367de20fb33fde8083bd3c7c8) diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c index b59cf13..f4fe6b7 100644 --- a/src/evdev-mt-touchpad-buttons.c +++ b/src/evdev-mt-touchpad-buttons.c @@ -569,10 +569,8 @@ tp_init_softbuttons(struct tp_dispatch *tp, * * On touchpads with visible markings we reduce the size of the * middle button since users have a visual guide. -* -* All Dell touchpads appear to have a middle marker. */ - if (tp->device->model_flags & EVDEV_MODEL_DELL_TOUCHPAD) { + if (tp->device->model_flags & EVDEV_MODEL_TOUCHPAD_VISIBLE_MARKER) { mm.x = width/2 - 5; /* 10mm wide */ edges = evdev_device_mm_to_units(device, ); mb_le = edges.x; diff --git a/src/evdev.c b/src/evdev.c index b29c328..103f5b2 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2174,7 +2174,7 @@ evdev_read_model_flags(struct evdev_device *device) MODEL(CYAPA), MODEL(HP_STREAM11_TOUCHPAD), MODEL(LENOVO_T450_TOUCHPAD), -
xserver-xorg-input-libinput: Changes to 'upstream-unstable'
conf/40-libinput.conf |7 + configure.ac |2 man/libinput.man | 184 +- src/xf86libinput.c| 133 ++-- 4 files changed, 183 insertions(+), 143 deletions(-) New commits: commit 1c3ce3ce3c315213511735db1b0fdd74ca8442d0 Author: Peter HuttererDate: Mon Dec 12 14:54:00 2016 +1000 xf86-input-libinput 0.23.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 9894817..7a1918b 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], -[0.22.0], +[0.23.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) commit 4d481ea7c80dad9f53b47c026959c25ad9da5211 Author: Peter Hutterer Date: Mon Dec 5 14:25:31 2016 +1000 Fix default scroll button number Was exposing the evdev code rather than the xorg code. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede diff --git a/src/xf86libinput.c b/src/xf86libinput.c index 747e84b..b130a77 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -4386,6 +4386,7 @@ LibinputInitScrollMethodsProperty(DeviceIntPtr dev, return; scroll_button = libinput_device_config_scroll_get_default_button(device); + scroll_button = btn_linux2xorg(scroll_button); prop_scroll_button_default = LibinputMakeProperty(dev, LIBINPUT_PROP_SCROLL_BUTTON_DEFAULT, XA_CARDINAL, 32, commit 72bac84df9ce72f2baf730655ecc23f1692d1e64 Author: Peter Hutterer Date: Tue Nov 15 11:23:08 2016 +1000 If the parent libinput_device is unavailable, create a new one The parent device ref's the libinput device during pre_init and unref's it during DEVICE_INIT, so the copy is lost. During DEVICE_ON, the libinput device is re-added and ref'd, this one stays around now. But the takeaway is: unless the device is enabled, no libinput device reference is available. If a device is a mixed pointer + keyboard device, a subdevice is created during a WorkProc. The subdevice relied on the parent's libinput_device being available and didn't even check for it. This WorkProc usually runs after the parent's DEVICE_ON, so in most cases all is well. But when running without logind and the server is vt-switched away, the parent device only runs PreInit and DEVICE_INIT but never DEVICE_ON, causing the subdevice to burn, crash, and generally fail horribly when it dereferences the parent's libinput device. Fix this because we have global warming already and don't need to burn more things and also because it's considered bad user experience to have the server crash. The simple fix is to check the parent device first and if it is unavailable, create a new one because it will end up disabled as well anyway, so the ref goes away as well. The use-case where the parent somehow gets disabled but the subdevice doesn't is a bit too niche to worry about. This doesn't happen with logind because in that case we don't get a usable fd while VT-switched away, so we can't even run PreInit and never get this far (see the paused fd handling in the xfree86 code for that). It can be reproduced by setting AutoEnableDevices off, but why would you do that, seriously. https://bugs.freedesktop.org/show_bug.cgi?id=97117 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede diff --git a/src/xf86libinput.c b/src/xf86libinput.c index 6792d1c..747e84b 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -2850,7 +2850,7 @@ xf86libinput_pre_init(InputDriverPtr drv, struct xf86libinput *driver_data = NULL; struct xf86libinput_device *shared_device = NULL; struct libinput *libinput = NULL; - struct libinput_device *device; + struct libinput_device *device = NULL; char *path = NULL; bool is_subdevice; @@ -2885,7 +2885,28 @@ xf86libinput_pre_init(InputDriverPtr drv, } is_subdevice = xf86libinput_is_subdevice(pInfo); - if (!is_subdevice) { + if (is_subdevice) { + InputInfoPtr parent; + struct xf86libinput *parent_driver_data; + + parent = xf86libinput_get_parent(pInfo); + if (!parent) { + xf86IDrvMsg(pInfo, X_ERROR, "Failed to find parent device\n"); + goto fail; +
libinput: Changes to 'upstream-unstable'
configure.ac |4 - src/evdev-mt-touchpad.c| 20 +++ src/evdev.c| 46 + src/evdev.h|4 + src/libinput-util.c| 97 - src/libinput-util.h| 75 src/path.c |2 src/udev-seat.c| 26 - test/misc.c| 95 test/touchpad.c| 24 + udev/90-libinput-model-quirks.hwdb |4 + 11 files changed, 344 insertions(+), 53 deletions(-) New commits: commit 4e485470475fe120e398e49beb30e46b3a73f5c8 Author: Peter HuttererDate: Wed Dec 7 14:23:34 2016 +1000 libinput 1.5.3 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 7c13a4e..b30a6fd 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [5]) -m4_define([libinput_micro_version], [2]) +m4_define([libinput_micro_version], [3]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=20:3:10 +LIBINPUT_LT_VERSION=20:4:10 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 9835acf7c76c2fb393b87e33585d917f7d056469 Author: Peter Hutterer Date: Mon Dec 5 13:39:42 2016 +1000 touchpad: sync BTN_TOOL_FINGER state on init The Elantech touchpad on my Asus Vivobook doesn't release BTN_TOOL_FINGER on up. If the touchpad was used before libinput initializes, the kernel filters the event because its state is already set. We never receive it and keep ignoring all events until the first switch to BTN_TOOL_DOUBLETAP and back. On touchpad init sync the BTN_TOOL_FINGER state and set it accordingly. This is the only event that can be legitimately down on init. We don't care about BTN_TOUCH because ignoring an ongoing touch on init is generally a good idea and we can ignore any multifinger gesture as well. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede (cherry picked from commit 5552a6f145b9cb9d8e00f2fdf25e0acb75fe6c72) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index af2a2cd..05e2ae5 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -1829,6 +1829,14 @@ tp_init_slots(struct tp_dispatch *tp, for (i = 1; i < tp->num_slots; i++) tp_sync_touch(tp, device, >touches[i], i); + /* Some touchpads don't reset BTN_TOOL_FINGER on touch up and only +* change to/from it when BTN_TOOL_DOUBLETAP is set. This causes us +* to ignore the first touches events until a two-finger gesture is +* performed. +*/ + if (libevdev_get_event_value(device->evdev, EV_KEY, BTN_TOOL_FINGER)) + tp_fake_finger_set(tp, BTN_TOOL_FINGER, 1); + return true; } diff --git a/test/touchpad.c b/test/touchpad.c index cdc261b..5b6f0a4 100644 --- a/test/touchpad.c +++ b/test/touchpad.c @@ -4365,6 +4365,29 @@ START_TEST(touchpad_slot_swap) } END_TEST +START_TEST(touchpad_finger_always_down) +{ + struct litest_device *dev = litest_current_device(); + struct libinput *li; + + /* Set BTN_TOOL_FINGER before a new context is initialized */ + litest_event(dev, EV_KEY, BTN_TOOL_FINGER, 1); + litest_event(dev, EV_SYN, SYN_REPORT, 0); + + li = litest_create_context(); + libinput_path_add_device(li, +libevdev_uinput_get_devnode(dev->uinput)); + litest_drain_events(li); + + litest_touch_down(dev, 0, 50, 50); + litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10, 0); + + litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); + + libinput_unref(li); +} +END_TEST + START_TEST(touchpad_time_usec) { struct litest_device *dev = litest_current_device(); @@ -4742,6 +4765,7 @@ litest_setup_tests_touchpad(void) litest_add_for_device("touchpad:bugs", touchpad_tool_tripletap_touch_count, LITEST_SYNAPTICS_TOPBUTTONPAD); litest_add_for_device("touchpad:bugs", touchpad_slot_swap, LITEST_SYNAPTICS_TOPBUTTONPAD); + litest_add_for_device("touchpad:bugs", touchpad_finger_always_down, LITEST_SYNAPTICS_TOPBUTTONPAD); litest_add("touchpad:time", touchpad_time_usec, LITEST_TOUCHPAD, LITEST_ANY); commit
libinput: Changes to 'upstream-unstable'
Makefile.am|2 + configure.ac | 44 +++-- doc/libinput.doxygen.in|3 -- src/evdev-mt-touchpad.c| 20 src/evdev.c|6 + src/evdev.h| 39 ++-- test/Makefile.am |3 ++ test/litest.c | 28 +-- test/touchpad-tap.c| 10 test/touchpad.c|4 +-- udev/90-libinput-model-quirks.hwdb |4 +++ udev/Makefile.am |3 +- 12 files changed, 120 insertions(+), 46 deletions(-) New commits: commit a9dad56948083939ecc71c2e569889289cf8c6d1 Author: Peter HuttererDate: Fri Nov 25 11:02:13 2016 +1000 libinput 1.5.2 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index a70f4be..7c13a4e 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [5]) -m4_define([libinput_micro_version], [1]) +m4_define([libinput_micro_version], [2]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=20:2:10 +LIBINPUT_LT_VERSION=20:3:10 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit cfdaaa32a73ba2f7b0379c2dbccabf120db8fc5e Author: Peter Hutterer Date: Mon Nov 21 08:39:47 2016 +1000 touchpad: only use the last two coordinates for delta calculation Taking the last 4 points means factoring in a coordinate that may be more than 40ms in the past - or even more when the finger moves slowly and we don't get events for a while. This makes the pointer more sluggish and slower to catch up with what the finger is actually doing. We already have the motion hysteresis as a separate item to prevent jumps (and thus adds some delay to the movement), the calculation over time doesn't provide enough benefit to justify the sluggish pointer. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index d72cb19..7b8514c 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -262,29 +262,19 @@ tp_end_sequence(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) tp_end_touch(tp, t, time); } -static double -tp_estimate_delta(int x0, int x1, int x2, int x3) -{ - return (x0 + x1 - x2 - x3) / 4.0; -} - struct normalized_coords tp_get_delta(struct tp_touch *t) { struct device_float_coords delta; const struct normalized_coords zero = { 0.0, 0.0 }; - if (t->history.count < TOUCHPAD_MIN_SAMPLES) + if (t->history.count <= 1) return zero; - delta.x = tp_estimate_delta(tp_motion_history_offset(t, 0)->x, - tp_motion_history_offset(t, 1)->x, - tp_motion_history_offset(t, 2)->x, - tp_motion_history_offset(t, 3)->x); - delta.y = tp_estimate_delta(tp_motion_history_offset(t, 0)->y, - tp_motion_history_offset(t, 1)->y, - tp_motion_history_offset(t, 2)->y, - tp_motion_history_offset(t, 3)->y); + delta.x = tp_motion_history_offset(t, 0)->x - + tp_motion_history_offset(t, 1)->x; + delta.y = tp_motion_history_offset(t, 0)->y - + tp_motion_history_offset(t, 1)->y; return tp_normalize_delta(t->tp, delta); } commit ab83c8e6267b9df5ab383e70e25e4d050a153601 Author: Peter Hutterer Date: Wed Nov 23 10:38:45 2016 +1000 doc: remove unnecessary linebreak in doxygen file Signed-off-by: Peter Hutterer diff --git a/doc/libinput.doxygen.in b/doc/libinput.doxygen.in index cd52972..6fde2c3 100644 --- a/doc/libinput.doxygen.in +++ b/doc/libinput.doxygen.in @@ -18,8 +18,7 @@ MATHJAX_RELPATH= https://cdn.mathjax.org/mathjax/latest GENERATE_LATEX = NO MACRO_EXPANSION= YES EXPAND_ONLY_PREDEF = YES -PREDEFINED = LIBINPUT_ATTRIBUTE_PRINTF(f, \ - a)= \ +PREDEFINED = LIBINPUT_ATTRIBUTE_PRINTF(f, a)= \ LIBINPUT_ATTRIBUTE_DEPRECATED DOTFILE_DIRS = @top_srcdir@/doc/dot
libinput: Changes to 'upstream-unstable'
Rebased ref, commits from common ancestor: commit 8616cc0bb9d483a8ef5955e1880e78f00a8f4746 Author: Peter HuttererDate: Fri Nov 11 13:49:27 2016 +1000 configure.ac: libinput 1.5.1 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 0ae9b76..43db9bb 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [5]) -m4_define([libinput_micro_version], [0]) +m4_define([libinput_micro_version], [1]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=20:1:10 +LIBINPUT_LT_VERSION=20:2:10 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 92c30b5a7188e5ec94eb4ebbc7b9a1523c67d341 Author: Hermann Gausterer Date: Wed Nov 9 16:58:07 2016 +0100 evdev: fix typo / bugzilla url Signed-off-by: Hermann Gausterer Signed-off-by: Peter Hutterer diff --git a/src/evdev.c b/src/evdev.c index d04636f..fac8fcb 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2749,7 +2749,7 @@ evdev_pre_configure_model_quirks(struct evdev_device *device) /* Claims to have double/tripletap but doesn't actually send it * https://bugzilla.redhat.com/show_bug.cgi?id=1351285 and -* https://bugzilla.redhat.com/show_bug.cgi?id=98538 +* https://bugs.freedesktop.org/show_bug.cgi?id=98538 */ if (device->model_flags & (EVDEV_MODEL_HP8510_TOUCHPAD|EVDEV_MODEL_HP6910_TOUCHPAD)) { commit 58c7a9cbf0aaa49b4802f2460acee20e4807dc28 Author: Peter Hutterer Date: Fri Oct 28 15:08:32 2016 +1000 evdev: implement support for the MOUSE_WHEEL_CLICK_COUNT property Not all mice have a click angle with integer degrees. The new MOUSE_WHEEL_CLICK_COUNT property specifies how many clicks per full rotation, the angle can be calculated from that. See https://github.com/systemd/systemd/pull/4440 for more information CLICK_COUNT overrides CLICK_ANGLE, so we check for the former first and then fall back to the angle if need be. No changes to the user-facing API. Signed-off-by: Peter Hutterer diff --git a/src/evdev.c b/src/evdev.c index 2412751..d04636f 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2008,7 +2008,7 @@ evdev_device_init_pointer_acceleration(struct evdev_device *device, static inline bool evdev_read_wheel_click_prop(struct evdev_device *device, const char *prop, - int *angle) + double *angle) { int val; @@ -2032,18 +2032,53 @@ evdev_read_wheel_click_prop(struct evdev_device *device, return false; } +static inline bool +evdev_read_wheel_click_count_prop(struct evdev_device *device, + const char *prop, + double *angle) +{ + int val; + + prop = udev_device_get_property_value(device->udev_device, prop); + if (!prop) + return false; + + val = parse_mouse_wheel_click_angle_property(prop); + if (val) { + *angle = 360.0/val; + return true; + } + + log_error(evdev_libinput_context(device), + "Mouse wheel click count '%s' is present but invalid, " + "using %d degrees for angle instead instead\n", + device->devname, + DEFAULT_WHEEL_CLICK_ANGLE); + *angle = DEFAULT_WHEEL_CLICK_ANGLE; + + return false; +} + static inline struct wheel_angle evdev_read_wheel_click_props(struct evdev_device *device) { struct wheel_angle angles; - evdev_read_wheel_click_prop(device, - "MOUSE_WHEEL_CLICK_ANGLE", - ); - if (!evdev_read_wheel_click_prop(device, -"MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL", -)) - angles.y = angles.x; + /* CLICK_COUNT overrides CLICK_ANGLE */ + if (!evdev_read_wheel_click_count_prop(device, + "MOUSE_WHEEL_CLICK_COUNT", + )) + evdev_read_wheel_click_prop(device, + "MOUSE_WHEEL_CLICK_ANGLE", + ); + if (!evdev_read_wheel_click_count_prop(device, +
xserver-xorg-input-libinput: Changes to 'upstream-unstable'
configure.ac |2 - src/xf86libinput.c | 58 +++-- 2 files changed, 57 insertions(+), 3 deletions(-) New commits: commit 728217775626e2086d7c3acd0d242562390f145b Author: Peter HuttererDate: Wed Oct 19 10:55:12 2016 +1000 xf86-input-libinput 0.22.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 3fad444..9894817 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], -[0.21.0], +[0.22.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) commit 1dd61abf7e6af9cdd12d8f5a35fe90954aa03e64 Author: Peter Hutterer Date: Wed Oct 19 10:37:32 2016 +1000 Wrap the input_lock calls into ifdefs Missing from a790ff35f9 Signed-off-by: Peter Hutterer diff --git a/src/xf86libinput.c b/src/xf86libinput.c index 061e495..24219a6 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -1158,12 +1158,20 @@ swap_registered_device(InputInfoPtr pInfo) while (next == pInfo || !is_libinput_device(next)) next = next->next; +#if HAVE_THREADED_INPUT input_lock(); +#else + int sigstate = xf86BlockSIGIO(); +#endif xf86RemoveEnabledDevice(pInfo); if (next) /* shouldn't ever be NULL anyway */ xf86AddEnabledDevice(next); driver_context.registered_InputInfoPtr = next; +#if HAVE_THREADED_INPUT input_unlock(); +#else + xf86UnblockSIGIO(sigstate); +#endif } static void commit c80954386d536b83f2c9290e1a88515c04505818 Author: Peter Hutterer Date: Wed Oct 19 09:24:37 2016 +1000 xf86-input-libinput 0.21.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index a1f80fe..3fad444 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], -[0.20.0], +[0.21.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) commit a790ff35f90e459fe03e0c78ab6f4e9dd5045dd0 Author: Peter Hutterer Date: Fri Oct 14 17:00:41 2016 +1000 Swap the registered input device on DEVICE_OFF when needed If we don't swap out the pInfo previously passed to xf86AddEnabledDevice(), the thread eventually calls read_input on a struct that has been deleted. Avoid this by swapping out the to-be-destroyed pInfo with the first one we find. Reproducer: sudo udevadm trigger --type=devices --action=add Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede diff --git a/src/xf86libinput.c b/src/xf86libinput.c index 69f7ae3..061e495 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -87,6 +87,7 @@ struct xf86libinput_driver { struct libinput *libinput; int device_enabled_count; + void *registered_InputInfoPtr; }; static struct xf86libinput_driver driver_context; @@ -583,6 +584,7 @@ xf86libinput_on(DeviceIntPtr dev) if (driver_context.device_enabled_count == 0) { #if HAVE_THREADED_INPUT xf86AddEnabledDevice(pInfo); + driver_context.registered_InputInfoPtr = pInfo; #else /* Can't use xf86AddEnabledDevice on an epollfd */ AddEnabledDevice(pInfo->fd); @@ -1131,6 +1133,39 @@ xf86libinput_init(DeviceIntPtr dev) return 0; } +static bool +is_libinput_device(InputInfoPtr pInfo) +{ + char *driver; + BOOL rc; + + driver = xf86CheckStrOption(pInfo->options, "driver", ""); + rc = strcmp(driver, "libinput") == 0; + free(driver); + + return rc; +} + +static void +swap_registered_device(InputInfoPtr pInfo) +{ + InputInfoPtr next; + + if (pInfo != driver_context.registered_InputInfoPtr) + return; + + next = xf86FirstLocalDevice(); + while (next == pInfo || !is_libinput_device(next)) + next = next->next; + + input_lock(); + xf86RemoveEnabledDevice(pInfo); + if (next) /* shouldn't ever be NULL anyway */ + xf86AddEnabledDevice(next); + driver_context.registered_InputInfoPtr = next; + input_unlock(); +} + static void xf86libinput_destroy(DeviceIntPtr dev) { @@ -1138,6 +1173,17 @@ xf86libinput_destroy(DeviceIntPtr dev) struct xf86libinput *driver_data = pInfo->private; struct xf86libinput_device *shared_device = driver_data->shared_device; + /* If the device being destroyed is the one we used for +* xf86AddEnabledDevice(), we need
xserver-xorg-input-libinput: Changes to 'upstream-unstable'
Rebased ref, commits from common ancestor: commit cd02040a5d4a8f120d225a4c09f5d1dfc751c0a8 Author: Peter HuttererDate: Fri Sep 30 17:01:21 2016 +1000 xf86-input-libinput 0.20.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 4158e57..a1f80fe 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], -[0.19.0], +[0.20.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) commit 0cfe9ec6c23e73507fd0797bae24c5ed6fcce033 Author: Michel Dänzer Date: Fri Sep 16 17:26:06 2016 +0900 Fix --with-xorg-conf-dir default value If --prefix isn't specified on the command line, $prefix contains "NONE" at this point, not the default prefix value. So make install would attempt to install the xorg.conf.d snippet to ${DESTDIR}NONE/share/X11/xorg.conf.d/. Avoid this by leaving ${prefix} verbatim in the default value, to be resolved by make. Signed-off-by: Michel Dänzer Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 4c72c75..4158e57 100644 --- a/configure.ac +++ b/configure.ac @@ -58,9 +58,9 @@ AC_SUBST(inputdir) AC_ARG_WITH(xorg-conf-dir, AC_HELP_STRING([--with-xorg-conf-dir=DIR], - [Default xorg.conf.d directory [[default=$prefix/share/X11/xorg.conf.d/]]]), + [Default xorg.conf.d directory [[default=${prefix}/share/X11/xorg.conf.d]]]), [xorgconfdir="$withval"], -[xorgconfdir="$prefix/share/X11/xorg.conf.d"]) +[xorgconfdir='${prefix}/share/X11/xorg.conf.d']) AC_SUBST(xorgconfdir) # X Server SDK location is required to install header files commit b87d2530db46a08de15376722873295e01bef16f Author: Keith Packard Date: Fri Sep 16 10:18:31 2016 -0700 Initializing strip association with wrong index This looks like a cut coding error to me, and it generated a compiler warning about possibly uninitialized value. Signed-off-by: Keith Packard Signed-off-by: Peter Hutterer diff --git a/src/xf86libinput.c b/src/xf86libinput.c index 888ba21..21f87f5 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -4537,7 +4537,7 @@ LibinputInitModeGroupProperties(DeviceIntPtr dev, nstrips = libinput_device_tablet_pad_get_num_strips(device); if (nstrips) { for (s = 0; s < nstrips; s++) { - associations[r] = -1; + associations[s] = -1; for (g = 0; g < ngroups; g++) { group = libinput_device_tablet_pad_get_mode_group(device, g); if (libinput_tablet_pad_mode_group_has_strip(group, s)) { commit 2f1df46ba9ef91c079f6485c04ac7c5515d6057a Author: Peter Hutterer Date: Tue Sep 13 14:37:07 2016 +1000 Correct the horizontal scroll property name Clear typo. Not bothering to be backwards compatible here, anything that uses the #define will update on rebuild, anyone using the string directly should've told me about the typo... Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede diff --git a/include/libinput-properties.h b/include/libinput-properties.h index e405453..8c6942d 100644 --- a/include/libinput-properties.h +++ b/include/libinput-properties.h @@ -147,7 +147,7 @@ /* Horizontal scroll events enabled: BOOL, 1 value (0 or 1). * If disabled, horizontal scroll events are discarded */ -#define LIBINPUT_PROP_HORIZ_SCROLL_ENABLED "libinput Horizonal Scroll Enabled" +#define LIBINPUT_PROP_HORIZ_SCROLL_ENABLED "libinput Horizontal Scroll Enabled" /* Number of modes each pad mode group has available: CARD8, one for each * pad mode group, read-only. commit fa69bb1bc244f378507e1ef2fbcb3ea343a59a32 Author: Peter Hutterer Date: Thu Aug 18 15:13:09 2016 +1000 Always delay hotplugging subdevices Avoid creating new devices from within the input thread which was the case for tablet tools. It requires a lot more care about locking and has a potential to mess up things. Instead, schedule a WorkProc and buffer all events until we have the device created. Once that's done, replay the event sequence so far. If the device comes into proximity and out again before we manage to create the new device we just ditch the whole sequence and wait for the next proximity in. Signed-off-by: Peter Hutterer diff --git a/src/xf86libinput.c
xserver-xorg-input-libinput: Changes to 'upstream-unstable'
configure.ac |2 +- include/libinput-properties.h |6 +++--- src/xf86libinput.c|2 +- 3 files changed, 5 insertions(+), 5 deletions(-) New commits: commit 9b9fa156020c7859bea3b6196769f390bdabf1ee Author: Peter HuttererDate: Wed Sep 14 07:17:51 2016 +1000 xf86-input-libinput 0.19.1 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 7dea666..48e5b19 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], -[0.19.0], +[0.19.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) commit 0d8d6f15e2961291c2bbf977913ba18ff20bad63 Author: Peter Hutterer Date: Tue Sep 13 14:37:07 2016 +1000 Correct the horizontal scroll property name Clear typo. Not bothering to be backwards compatible here, anything that uses the #define will update on rebuild, anyone using the string directly should've told me about the typo... Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede (cherry picked from commit 2f1df46ba9ef91c079f6485c04ac7c5515d6057a) diff --git a/include/libinput-properties.h b/include/libinput-properties.h index cb3dd2f..56ee625 100644 --- a/include/libinput-properties.h +++ b/include/libinput-properties.h @@ -140,6 +140,6 @@ /* Horizontal scroll events enabled: BOOL, 1 value (0 or 1). * If disabled, horizontal scroll events are discarded */ -#define LIBINPUT_PROP_HORIZ_SCROLL_ENABLED "libinput Horizonal Scroll Enabled" +#define LIBINPUT_PROP_HORIZ_SCROLL_ENABLED "libinput Horizontal Scroll Enabled" #endif /* _LIBINPUT_PROPERTIES_H_ */ commit e85ec72025bf003cf73948d02297bf46159f1eac Author: Peter Hutterer Date: Tue Aug 16 09:34:36 2016 +1000 Comment two read-only properties as such Signed-off-by: Peter Hutterer (cherry picked from commit b508c54fa0d569beb00ccba3d5b27ca993aae94d) diff --git a/include/libinput-properties.h b/include/libinput-properties.h index d117729..cb3dd2f 100644 --- a/include/libinput-properties.h +++ b/include/libinput-properties.h @@ -33,13 +33,13 @@ /* Tap drag enabled/disabled: BOOL, 1 value */ #define LIBINPUT_PROP_TAP_DRAG "libinput Tapping Drag Enabled" -/* Tap drag default enabled/disabled: BOOL, 1 value */ +/* Tap drag default enabled/disabled: BOOL, 1 value, read-only */ #define LIBINPUT_PROP_TAP_DRAG_DEFAULT "libinput Tapping Drag Enabled Default" /* Tap drag lock enabled/disabled: BOOL, 1 value */ #define LIBINPUT_PROP_TAP_DRAG_LOCK "libinput Tapping Drag Lock Enabled" -/* Tap drag lock default enabled/disabled: BOOL, 1 value */ +/* Tap drag lock default enabled/disabled: BOOL, 1 value, read-only */ #define LIBINPUT_PROP_TAP_DRAG_LOCK_DEFAULT "libinput Tapping Drag Lock Enabled Default" /* Calibration matrix: FLOAT, 9 values of a 3x3 matrix, in rows */ commit 758e9037b56a502f90a032b2438dc307334ca190 Author: Peter Hutterer Date: Mon May 9 07:58:51 2016 +1000 Discard buttons >= 256 https://bugs.freedesktop.org/show_bug.cgi?id=95295 Signed-off-by: Peter Hutterer (cherry picked from commit ce85432f41549cd6f3c6e0c5e2e39d0c1aee8dfd) diff --git a/src/xf86libinput.c b/src/xf86libinput.c index dd3250c..392d862 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -1116,7 +1116,7 @@ xf86libinput_handle_button(InputInfoPtr pInfo, struct libinput_event_pointer *ev if (draglock_get_mode(_data->draglock) != DRAGLOCK_DISABLED) draglock_filter_button(_data->draglock, , _press); - if (button) + if (button && button < 256) xf86PostButtonEvent(dev, Relative, button, is_press, 0, 0); }
libinput: Changes to 'upstream-unstable'
README.txt | 14 configure.ac | 29 doc/Makefile.am|2 doc/building.dox | 100 ++ doc/faqs.dox |2 doc/libinput.doxygen.in|1 doc/middle-button-emulation.dox| 34 doc/page-hierarchy.dox |2 doc/tablet-support.dox | 13 doc/test-suite.dox | 21 src/evdev-mt-touchpad-buttons.c| 113 +- src/evdev-mt-touchpad-edge-scroll.c| 24 src/evdev-mt-touchpad-gestures.c |5 src/evdev-mt-touchpad-tap.c| 82 + src/evdev-mt-touchpad.c| 260 +++-- src/evdev-mt-touchpad.h| 28 src/evdev-tablet-pad.c |1 src/evdev-tablet.c | 119 ++ src/evdev-tablet.h |5 src/evdev.c| 1208 +++-- src/evdev.h| 157 ++- src/libinput-private.h | 18 src/libinput-uninstalled.pc.in | 10 src/libinput-util.c|2 src/libinput-util.h| 16 src/libinput.c | 36 src/libinput.h | 105 +- src/libinput.sym |6 test/Makefile.am | 111 -- test/device.c | 95 + test/gestures.c|4 test/keyboard.c|2 test/litest-device-mouse-wheel-click-angle.c |1 test/litest-device-synaptics.c |4 test/litest-device-wacom-cintiq-13hdt-finger.c | 10 test/litest-device-wacom-cintiq-13hdt-pad.c|3 test/litest-device-wacom-cintiq-13hdt-pen.c| 10 test/litest-device-wacom-hid4800-pen.c | 119 ++ test/litest-device-wacom-intuos-finger.c | 10 test/litest-device-wacom-intuos-tablet.c | 10 test/litest-device-wacom-intuos5-pad.c |1 test/litest.c | 592 +++- test/litest.h | 46 test/log.c |4 test/misc.c|6 test/pad.c |2 test/path.c| 14 test/pointer.c | 13 test/tablet.c | 455 + test/touch.c |2 test/touchpad-buttons.c|2 test/touchpad-tap.c| 302 -- test/touchpad.c| 494 ++ test/trackball.c |2 test/trackpoint.c | 100 ++ test/udev.c| 14 tools/event-debug.c| 12 tools/shared.c | 21 tools/shared.h |1 udev/90-libinput-model-quirks.hwdb | 15 udev/Makefile.am |9 udev/libinput-device-group.c | 64 + 62 files changed, 3748 insertions(+), 1215 deletions(-) New commits: commit 47b59ca85084d87db6a3d312ddf500e5dbaa937e Author: Peter HuttererDate: Wed Sep 14 14:49:55 2016 +1000 configure.ac: libinput 1.5.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 38b465d..47e1594 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) -m4_define([libinput_minor_version], [4]) -m4_define([libinput_micro_version], [901]) +m4_define([libinput_minor_version], [5]) +m4_define([libinput_micro_version], [0]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=20:0:10 +LIBINPUT_LT_VERSION=20:1:10 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit f43a072d2c7ea87a2430c373765190f785e57fa0 Author: Peter Hutterer Date: Wed Sep 14 11:21:55 2016 +1000 udev: fix hwdb match for the HP Stream 11 prefix must be libinput, not evdev Signed-off-by: Peter Hutterer
libinput: Changes to 'upstream-unstable'
README.txt | 17 +++ configure.ac|4 +- doc/faqs.dox| 46 src/evdev-mt-touchpad.c | 18 src/evdev.c |4 ++ udev/80-libinput-device-groups.rules.in |1 6 files changed, 87 insertions(+), 3 deletions(-) New commits: commit 23388c99c3f2a3e3e3383558d4a859192bfe2076 Author: Peter HuttererDate: Fri Aug 5 11:30:41 2016 +1000 libinput 1.4.1 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 9e238b4..c81bb51 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [4]) -m4_define([libinput_micro_version], [0]) +m4_define([libinput_micro_version], [1]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=19:1:9 +LIBINPUT_LT_VERSION=19:2:9 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 657c0872861c5f6a0c33c63eea74dd442403de0c Author: Peter Hutterer Date: Fri Aug 5 11:14:17 2016 +1000 doc: add some info about configuring devices in wayland/xorg Signed-off-by: Peter Hutterer (cherry picked from commit ae30353a739cf059a987cdc5b41173212bd66500) diff --git a/doc/faqs.dox b/doc/faqs.dox index c88f452..973e566 100644 --- a/doc/faqs.dox +++ b/doc/faqs.dox @@ -54,6 +54,52 @@ option is not exposed by the intermediary, it cannot be configured by the client. Also some configuration options that are provided by the intermediary may not be libinput-specific configuration options. +@section faq_configure_wayland How do I configure my device on Wayland? + +See @ref faq_config_options Use the configuration tool provided by your +desktop environment (e.g. gnome-control-center) or direct access to your +desktop environment's configuration storage (e.g. gsettings). + +@section faq_configure_xorg How do I configure my device on X? + +See @ref faq_config_options If your desktop environment does not provide a +graphical configuration tool you can use an +https://www.x.org/archive/current/doc/man/man5/xorg.conf.5.xhtml;>xorg.conf.d snippet. +Usually, such a snippet looks like this: + +$> cat /etc/X11/xorg.conf.d/99-libinput-custom-config.conf +Section "InputClass" + Identifier "something to identify this snippet" + MatchDriver "libinput" + MatchProduct "substring of the device name" + Option "some option name" "the option value" +EndSection + + +The identifier is merely a human-readable string that shows up in the log +file. The MatchProduct line should contain the device name or a substring of +the device name that the snippet should apply to. For a full list of option +names and permitted values, see the +https://www.mankier.com/4/libinput;>libinput man page. +xorg.conf.d snippets like the above apply to hotplugged devices but can be +overwritten at runtime by desktop tools. Multiple snippets may be placed +into the same file. + +For run-time configuration and testing, the +https://www.x.org/archive/X11R7.5/doc/man/man1/xinput.1.html;>xinput +debugging tool can modify a devices' properties. See the +https://www.mankier.com/4/libinput;>libinput man page +for supported property names and values. Usually, an invocation looks like +this: + +$> xinput set-prop "the device name" "the property name" value [value2] [value3] + + +@note +Changes performed by xinput do not persist across device hotplugs. xinput is +considered a debugging and testing tool only and should not be used for +permanent configurations. + @section faq_hwdb_changes How to apply hwdb changes Sometimes users are asked to test updates to the Date: Wed Jul 6 07:59:31 2016 +1000 touchpad: use the udev ID_INPUT_TOUCHPAD_INTEGRATION property if available udev now labels touchpads as "internal" or "external" for us, use that value where available and only fall back onto our own labelling if it's missing or unknown. systemd commit: https://github.com/systemd/systemd/pull/3638 https://bugs.freedesktop.org/show_bug.cgi?id=96735 Signed-off-by: Peter Hutterer (cherry picked from commit 64e39411892fa4897f6e018daaa2de2ffaf8b671) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index a7b5a87..756d283 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -1589,6 +1589,24 @@ evdev_tag_touchpad(struct evdev_device *device,
libinput: Changes to 'upstream-unstable'
.gitignore |2 configure.ac | 57 +- doc/Makefile.am| 29 - doc/clickpad-softbuttons.dox |4 doc/faqs.dox | 31 + doc/svg/tablet-cintiq24hd-modes.svg| 460 + doc/svg/tablet-intuos-modes.svg| 321 +++ doc/tablet-support.dox | 59 ++ src/Makefile.am|1 src/evdev-middle-button.c | 16 src/evdev-mt-touchpad-buttons.c| 136 - src/evdev-mt-touchpad-edge-scroll.c| 30 - src/evdev-mt-touchpad-gestures.c | 40 - src/evdev-mt-touchpad.c| 160 - src/evdev-mt-touchpad.h|5 src/evdev-tablet-pad-leds.c| 177 ++ src/evdev-tablet-pad.c | 82 ++- src/evdev-tablet-pad.h | 18 src/evdev-tablet.c | 54 +- src/evdev-tablet.h |6 src/evdev.c| 171 -- src/evdev.h| 52 + src/filter.c | 80 ++ src/libinput-private.h | 38 + src/libinput-util.h| 52 + src/libinput.c | 260 + src/libinput.h | 674 +++-- src/libinput.sym | 22 test/Makefile.am | 16 test/device.c | 16 test/gestures.c| 10 test/litest-device-alps-dualpoint.c| 11 test/litest-device-apple-magicmouse.c | 104 +++ test/litest-device-keyboard-all-codes.c| 76 ++ test/litest-device-logitech-trackball.c|2 test/litest-device-synaptics-i2c.c | 11 test/litest-device-wacom-cintiq-13hdt-finger.c | 102 +++ test/litest-device-wacom-cintiq-13hdt-pad.c| 121 test/litest-device-wacom-cintiq-13hdt-pen.c| 147 + test/litest-device-wacom-cintiq-24hdt-pad.c| 148 + test/litest-device-wacom-ekr.c | 132 test/litest.c | 91 +++ test/litest.h | 34 + test/pad.c | 234 test/pointer.c | 16 test/tablet.c |4 test/touchpad-buttons.c| 233 test/touchpad.c| 189 ++- test/trackball.c | 273 ++ tools/Makefile.am |2 tools/event-debug.c| 47 + tools/event-gui.c |2 tools/libinput-list-devices.c | 39 + udev/90-libinput-model-quirks.hwdb | 22 54 files changed, 4692 insertions(+), 427 deletions(-) New commits: commit 67c7ba9bf3246aadf472cfddff62e745f00dde19 Author: Peter HuttererDate: Mon Jul 18 11:17:56 2016 +1000 configure.ac: libinput 1.4.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 0e7ffc2..9e238b4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) -m4_define([libinput_minor_version], [3]) -m4_define([libinput_micro_version], [901]) +m4_define([libinput_minor_version], [4]) +m4_define([libinput_micro_version], [0]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=19:0:9 +LIBINPUT_LT_VERSION=19:1:9 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 3758f3cdef0d7d6388025a1a843cafdcfd007351 Author: Peter Hutterer Date: Mon Jul 18 10:08:16 2016 +1000 test: make one ALPS and the Synaptics i2c test devices Dell touchpads The i2c one came from an Dell XPS13. The ALPS one I can't remember but highly likely they were on Dells and if not, nothing really changes here anyway because it's not a clickpad and right now only clickpads have dell-specific behaviour. Signed-off-by: Peter Hutterer diff --git a/test/litest-device-alps-dualpoint.c b/test/litest-device-alps-dualpoint.c index
libinput: Changes to 'upstream-unstable'
configure.ac |4 - doc/Makefile.am|1 doc/absolute-coordinate-ranges.dox | 119 + doc/page-hierarchy.dox |1 src/evdev-mt-touchpad.c| 95 - src/evdev-mt-touchpad.h|6 + src/evdev-tablet-pad.c |4 - src/evdev.c|8 +- src/evdev.h|2 test/litest.c | 42 - test/litest.h |7 -- test/touchpad.c| 69 - tools/libinput-list-devices.c |9 +- udev/90-libinput-model-quirks.hwdb | 20 -- 14 files changed, 221 insertions(+), 166 deletions(-) New commits: commit ef03affa2a50a46c4d286f628b0001e82fc78680 Author: Peter HuttererDate: Fri Jun 24 15:02:41 2016 +1000 configure.ac: libinput 1.3.3 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index e55aa22..0c4059b 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [3]) -m4_define([libinput_micro_version], [2]) +m4_define([libinput_micro_version], [3]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=18:5:8 +LIBINPUT_LT_VERSION=18:6:8 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit a6c2274ab57f39381c36ff30c15024950f7bfa71 Author: Peter Hutterer Date: Thu Jun 16 16:11:56 2016 +1000 touchpad: re-enable hysteresis by default for all devices The removal of the hysteresis even on precise touchpads has led to difficulties controlling the cursor in a few instances. Since 27078b2667d we only have the hysteresis on Apple touchpads and the Lenovo *40 series and later. Even on those do we see some positioning difficulties (bug 94379). So restore the hysteresis by default again for all touchpads. In the future a knob could be exposed for precision vs reactivity or something, but for now the drawback of imprecise positioning does not outweigh the benefits we get on those few devices. https://bugs.freedesktop.org/show_bug.cgi?id=94379 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede (cherry picked from commit 48473994c8e60189356feae7b7eae25288e5ac28) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 9eac42e..9b557df 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -2065,12 +2065,6 @@ tp_init_hysteresis(struct tp_dispatch *tp) { int res_x, res_y; - tp->hysteresis_margin.x = 0; - tp->hysteresis_margin.y = 0; - - if (tp->device->model_flags & EVDEV_MODEL_PRECISE_TOUCHPAD) - return; - res_x = tp->device->abs.absinfo_x->resolution; res_y = tp->device->abs.absinfo_y->resolution; tp->hysteresis_margin.x = res_x/2; diff --git a/src/evdev.c b/src/evdev.c index 198244a..293e7e9 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1736,7 +1736,6 @@ evdev_read_model_flags(struct evdev_device *device) { "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT }, { "LIBINPUT_MODEL_CYAPA", EVDEV_MODEL_CYAPA }, { "LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD", EVDEV_MODEL_LENOVO_T450_TOUCHPAD }, - { "LIBINPUT_MODEL_PRECISE_TOUCHPAD", EVDEV_MODEL_PRECISE_TOUCHPAD }, { NULL, EVDEV_MODEL_DEFAULT }, }; const struct model_map *m = model_map; diff --git a/src/evdev.h b/src/evdev.h index 6f39548..a8c3b4d 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -114,7 +114,6 @@ enum evdev_device_model { EVDEV_MODEL_CYBORG_RAT = (1 << 14), EVDEV_MODEL_CYAPA = (1 << 15), EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17), - EVDEV_MODEL_PRECISE_TOUCHPAD = (1 << 18), }; struct mt_slot { diff --git a/test/litest-device-synaptics-x1-carbon-3rd.c b/test/litest-device-synaptics-x1-carbon-3rd.c index 9d4034d..23d9c5b 100644 --- a/test/litest-device-synaptics-x1-carbon-3rd.c +++ b/test/litest-device-synaptics-x1-carbon-3rd.c @@ -121,7 +121,6 @@ static const char udev_rule[] = "\n" "ATTRS{name}==\"litest SynPS/2 Synaptics TouchPad X1C3rd\"," "ENV{LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD}=\"1\"\n" -"ENV{LIBINPUT_MODEL_PRECISE_TOUCHPAD}=\"1\"\n" "\n" "LABEL=\"touchpad_end\""; diff --git a/udev/90-libinput-model-quirks.hwdb
libinput: Changes to 'upstream-unstable'
configure.ac |4 +-- doc/Makefile.am| 12 +-- src/evdev-mt-touchpad-gestures.c |2 - src/evdev-mt-touchpad.c|4 ++- src/evdev-tablet-pad.c |4 +++ src/evdev.c|6 - src/libinput.h | 21 ++-- test/keyboard.c| 38 + udev/90-libinput-model-quirks.hwdb |8 +++ 9 files changed, 86 insertions(+), 13 deletions(-) New commits: commit 568be0867f7ac8c37912ad6724a053f40f6aae51 Author: Peter HuttererDate: Mon May 30 08:51:11 2016 +1000 configure.ac: libinput 1.3.1 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index a44d84c..3cf46d4 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [3]) -m4_define([libinput_micro_version], [0]) +m4_define([libinput_micro_version], [1]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=18:3:8 +LIBINPUT_LT_VERSION=18:4:8 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 0d5d367a82d250d3cdf4b1e21c48bf1cf81b8d7a Author: Peter Hutterer Date: Fri May 27 10:35:34 2016 +1000 doc: add the missing svg files to the Makefile.am Signed-off-by: Peter Hutterer (cherry picked from commit 8d80aae784dececda72ff6c9409b4d421a887f20) diff --git a/doc/Makefile.am b/doc/Makefile.am index 58effde..62630d0 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -39,15 +39,23 @@ diagram_files = \ $(srcdir)/dot/evemu.gv \ $(srcdir)/svg/button-scrolling.svg \ $(srcdir)/svg/clickfinger.svg \ + $(srcdir)/svg/clickfinger-distance.svg \ $(srcdir)/svg/edge-scrolling.svg \ + $(srcdir)/svg/gesture-2fg-ambiguity.svg \ $(srcdir)/svg/palm-detection.svg \ $(srcdir)/svg/pinch-gestures.svg \ + $(srcdir)/svg/pinch-gestures-softbuttons.svg \ $(srcdir)/svg/ptraccel-linear.svg \ $(srcdir)/svg/ptraccel-low-dpi.svg \ $(srcdir)/svg/ptraccel-touchpad.svg \ $(srcdir)/svg/ptraccel-trackpoint.svg \ $(srcdir)/svg/software-buttons.svg \ $(srcdir)/svg/swipe-gestures.svg \ + $(srcdir)/svg/tablet-axes.svg \ + $(srcdir)/svg/tablet-interfaces.svg \ + $(srcdir)/svg/tablet-left-handed.svg \ + $(srcdir)/svg/tablet-out-of-bounds.svg \ + $(srcdir)/svg/tablet.svg \ $(srcdir)/svg/tap-n-drag.svg \ $(srcdir)/svg/thumb-detection.svg \ $(srcdir)/svg/top-software-buttons.svg \ commit 0694e46ccf0a6337441d5e02fb5049f12d97c8cf Author: Peter Hutterer Date: Fri May 27 10:33:24 2016 +1000 doc: sort the svg files alphabetically Signed-off-by: Peter Hutterer (cherry picked from commit 7f9c1f1c6c624252fa50693b05f595304aa26764) diff --git a/doc/Makefile.am b/doc/Makefile.am index f56ed6a..58effde 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -37,9 +37,8 @@ diagram_files = \ $(srcdir)/dot/libinput-stack-xorg.gv \ $(srcdir)/dot/libinput-stack-gnome.gv \ $(srcdir)/dot/evemu.gv \ - $(srcdir)/svg/software-buttons.svg \ - $(srcdir)/svg/clickfinger.svg \ $(srcdir)/svg/button-scrolling.svg \ + $(srcdir)/svg/clickfinger.svg \ $(srcdir)/svg/edge-scrolling.svg \ $(srcdir)/svg/palm-detection.svg \ $(srcdir)/svg/pinch-gestures.svg \ @@ -47,6 +46,7 @@ diagram_files = \ $(srcdir)/svg/ptraccel-low-dpi.svg \ $(srcdir)/svg/ptraccel-touchpad.svg \ $(srcdir)/svg/ptraccel-trackpoint.svg \ + $(srcdir)/svg/software-buttons.svg \ $(srcdir)/svg/swipe-gestures.svg \ $(srcdir)/svg/tap-n-drag.svg \ $(srcdir)/svg/thumb-detection.svg \ commit 97ff0002e9b9276819e1caaad204711948bde2bb Author: Peter Hutterer Date: Thu May 26 08:40:17 2016 +1000 pad: ignore EV_MSC events The Wacom Express Key Remote sends the serial number via EV_MSC. At some later point we'll need the serial to match the LEDs correctly but for now we can ignore them. Signed-off-by: Peter Hutterer (cherry picked from commit 0933650f664560f81145c780ea982f49d4df1924) diff --git a/src/evdev-tablet-pad.c b/src/evdev-tablet-pad.c index ad6ead8..5341657 100644 --- a/src/evdev-tablet-pad.c +++
xserver-xorg-input-libinput: Changes to 'upstream-unstable'
Makefile.am |2 +- conf/60-libinput.conf | 28 conf/90-libinput.conf | 28 configure.ac |2 +- src/xf86libinput.c|1 + 5 files changed, 31 insertions(+), 30 deletions(-) New commits: commit f9b6fa21df735e9a68c5f527afc422f519d6002c Author: Peter HuttererDate: Thu Apr 28 13:43:49 2016 +1000 xf86-input-libinput 0.19.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 722411b..7dea666 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], -[0.18.0], +[0.19.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) commit 3f569ec493e738242da97afe30f7dd2a3b2b834d Author: Peter Hutterer Date: Tue Apr 26 15:45:18 2016 +1000 conf: rename to 60-libinput.conf 60 sorts higher than the other drivers (evdev has 10, synaptics, wacom and others have 50) so we keep the same order. This is part of a two-step solution, the other half is renaming the xf86-input-wacom's config snippet to sort higher than libinput's. Currently libinput picks up devices that are (for now) destined to the wacom driver. Since the wacom driver is more of a leaf package than libinput, the best option here is to make the wacom driver sort higher and let users uninstall it when not needed. To avoid crowding the 90-* space where users usually have custom config snippets, drop libinput down to 60 and bump wacom up. Signed-off-by: Peter Hutterer Acked-by: Jason Gerecke diff --git a/Makefile.am b/Makefile.am index 4001f94..c73c15f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -27,7 +27,7 @@ MAINTAINERCLEANFILES = ChangeLog INSTALL pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xorg-libinput.pc -dist_xorgconf_DATA = conf/90-libinput.conf +dist_xorgconf_DATA = conf/60-libinput.conf .PHONY: ChangeLog INSTALL diff --git a/conf/60-libinput.conf b/conf/60-libinput.conf new file mode 100644 index 000..97afd07 --- /dev/null +++ b/conf/60-libinput.conf @@ -0,0 +1,28 @@ +# Match on all types of devices but tablet devices and joysticks +Section "InputClass" +Identifier "libinput pointer catchall" +MatchIsPointer "on" +MatchDevicePath "/dev/input/event*" +Driver "libinput" +EndSection + +Section "InputClass" +Identifier "libinput keyboard catchall" +MatchIsKeyboard "on" +MatchDevicePath "/dev/input/event*" +Driver "libinput" +EndSection + +Section "InputClass" +Identifier "libinput touchpad catchall" +MatchIsTouchpad "on" +MatchDevicePath "/dev/input/event*" +Driver "libinput" +EndSection + +Section "InputClass" +Identifier "libinput touchscreen catchall" +MatchIsTouchscreen "on" +MatchDevicePath "/dev/input/event*" +Driver "libinput" +EndSection diff --git a/conf/90-libinput.conf b/conf/90-libinput.conf deleted file mode 100644 index 97afd07..000 --- a/conf/90-libinput.conf +++ /dev/null @@ -1,28 +0,0 @@ -# Match on all types of devices but tablet devices and joysticks -Section "InputClass" -Identifier "libinput pointer catchall" -MatchIsPointer "on" -MatchDevicePath "/dev/input/event*" -Driver "libinput" -EndSection - -Section "InputClass" -Identifier "libinput keyboard catchall" -MatchIsKeyboard "on" -MatchDevicePath "/dev/input/event*" -Driver "libinput" -EndSection - -Section "InputClass" -Identifier "libinput touchpad catchall" -MatchIsTouchpad "on" -MatchDevicePath "/dev/input/event*" -Driver "libinput" -EndSection - -Section "InputClass" -Identifier "libinput touchscreen catchall" -MatchIsTouchscreen "on" -MatchDevicePath "/dev/input/event*" -Driver "libinput" -EndSection commit 602bb8eefac929501b2cd5e5bd4a9838d1903774 Author: Stanislav Ochotnicky Date: Wed Oct 14 10:43:34 2015 +1000 Fix implicit declaration of function 'xf86Msg' in xf86libinput.c Addition of xf86.h header fixes compilation issues in some cases. See: https://bugs.gentoo.org/show_bug.cgi?id=560970 Signed-off-by: Stanislav Ochotnicky Signed-off-by: Peter Hutterer diff --git a/src/xf86libinput.c b/src/xf86libinput.c index bc5d685..dd3250c 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include
libinput: Changes to 'upstream-unstable'
Rebased ref, commits from common ancestor: commit dfd9517f5a17001ed4e13c41d16fe935d2b190db Author: Peter HuttererDate: Tue May 10 13:53:24 2016 +1000 configure.ac: libinput 1.3.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index df53289..a44d84c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) -m4_define([libinput_minor_version], [2]) -m4_define([libinput_micro_version], [903]) +m4_define([libinput_minor_version], [3]) +m4_define([libinput_micro_version], [0]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -35,7 +35,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=18:2:8 +LIBINPUT_LT_VERSION=18:3:8 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 87550f8dc97c0339d7339124477e736b13837c68 Author: Peter Hutterer Date: Mon May 9 11:13:55 2016 +1000 doc: add an entry about tablets in left-handed mode Signed-off-by: Peter Hutterer diff --git a/doc/svg/tablet-left-handed.svg b/doc/svg/tablet-left-handed.svg new file mode 100644 index 000..ff73fd9 --- /dev/null +++ b/doc/svg/tablet-left-handed.svg @@ -0,0 +1,469 @@ + + + +http://purl.org/dc/elements/1.1/; + xmlns:cc="http://creativecommons.org/ns#; + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#; + xmlns:svg="http://www.w3.org/2000/svg; + xmlns="http://www.w3.org/2000/svg; + xmlns:xlink="http://www.w3.org/1999/xlink; + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd; + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape; + width="251.43713mm" + height="65.496956mm" + viewBox="0 0 890.91894 232.07583" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="tablet-left-handed.svg"> + + + + + + + + + + + + + + + + + + + + + + + + + + + +image/svg+xml +http://purl.org/dc/dcmitype/StillImage; /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +origin +origin + + + zero + + + + zero + + + diff --git a/doc/tablet-support.dox b/doc/tablet-support.dox index 0a44010..c555cea 100644 --- a/doc/tablet-support.dox +++ b/doc/tablet-support.dox @@ -245,4 +245,35 @@ caller and libinput does not provide specific handling. Callers should use external sources like libwacom to identify which buttons have semantic behaviors. +@section tablet-left-handed Tablets in left-handed mode + +Left-handed mode on tablet devices usually means rotating the physical +tablet by 180 degrees to move the tablet pad button area to right side of +the tablet. When left-handed mode is enabled on a tablet device (see +libinput_device_config_left_handed_set()) the tablet tool and tablet pad +behavior changes. In left-handed mode, the tools' axes are adjusted +so that the origin of each axis remains the logical north-east of +the physical tablet. For example, the x and y axes are inverted and the +positive x/y coordinates are down/right of the top-left corner of the tablet +in its current orientation. On a tablet pad, the ring and strip are +similarly adjusted. The origin of the ring and strips remain the top-most +point. + +@image html tablet-left-handed.svg "Tablet axes in right- and left-handed mode" + +Pad buttons are not affected by left-handed mode; the number of each button +remains the same even when the perceived physical location of the button +changes. This is a conscious design decision: +- Tablet pad buttons do not have intrinsic semantic meanings. Re-ordering + the button numbers would not change any functionality. +- Button numbers should not be exposed directly to the user but handled in + the intermediate layers. Re-ordering button numbers thus has no + user-visible effect. +- Re-ordering button numbers may complicate the intermediate layers. + +Left-handed mode is only available on some tablets, some tablets are +symmetric and thus do not support left-handed mode. libinput requires +libwacom to determine if a tablet is capable of being switched to +left-handed mode. + */ commit 3ff302694ee3ee98e370fccb2a4ad1a70a148a7f Author:
libinput: Changes to 'upstream-unstable'
configure.ac |4 ++-- src/evdev-mt-touchpad.c|2 +- src/evdev-tablet.c | 35 +++ src/evdev-tablet.h |2 ++ test/litest.c |2 +- udev/90-libinput-model-quirks.hwdb | 20 ++-- 6 files changed, 51 insertions(+), 14 deletions(-) New commits: commit 49d9fd855912ad91f41c4741124e382dff12eb6b Author: Peter HuttererDate: Tue Apr 19 09:11:25 2016 +1000 libinput 1.2.4 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 876786c..602a860 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [2]) -m4_define([libinput_micro_version], [3]) +m4_define([libinput_micro_version], [4]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=17:5:7 +LIBINPUT_LT_VERSION=17:6:7 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 50cc2aaf85652c0449e39dd5aa86c3cdf98c7a37 Author: Peter Frühberger Date: Wed Apr 13 08:55:28 2016 +0200 touchpad: enlarge top button area by a factor 3 instead of 1.5 When the touchpad is disabled, the top software button on the Lenovo T440 series touchpads currently enlarge by a factor of 1.5 (to 15mm). This is not enough, a user has to rotate the wrist quite uncomfortable when using the left mouse button. When the touchpad itself is off anyway we can extend the size of the top software buttons to the factor 3, i.e. 30mm. Signed-off-by: Peter Frühberger Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede (cherry picked from commit f00b5d609c783a1ac90a46e026838f37a15d5e3e) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 082493c..2ab6fd3 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -1152,7 +1152,7 @@ tp_suspend(struct tp_dispatch *tp, struct evdev_device *device) if (tp->buttons.has_topbuttons) { evdev_notify_suspended_device(device); /* Enlarge topbutton area while suspended */ - tp_init_top_softbuttons(tp, device, 1.5); + tp_init_top_softbuttons(tp, device, 3.0); } else { evdev_device_suspend(device); } commit 3d79cf657209ad359d22e2b2c255b3de5d2c39eb Author: Peter Hutterer Date: Wed Apr 13 11:15:56 2016 +1000 udev: update the hwdb matches to avoid use of ( and ) libudev's util_replace_chars() replaces the () with underscores so that match would work too but let's use ? instead to make it look like a regex. This now activates the rules for all cyapa touchpads, before they wouldn't have applied to any device. https://bugs.freedesktop.org/show_bug.cgi?id=93846#c12 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede (cherry picked from commit 8ebe33827e52816bdb1da4873c98168a8fcc2ae4) diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index d5978f7..242c444 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -62,22 +62,22 @@ libinput:name:*ETPS/2 Elantech Touchpad*:dmi:* # The various chromebooks, info from modinfo chromeos_laptop, touchpad names # extrapolated from the chromiumos touchad-tests repo # https://chromium.googlesource.com/chromiumos/platform/touchpad-tests -libinput:name:Cypress APA Trackpad (cyapa):dmi:*pnFalco:pvr* +libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*pnFalco:pvr* libinput:name:SynPS/2 Synaptics TouchPad:dmi:*pn*Mario* -libinput:name:Cypress APA Trackpad (cyapa):dmi:*pn*Butterfly* -libinput:name:Cypress APA Trackpad (cyapa):dmi:*pn*Peppy* +libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*pn*Butterfly* +libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*pn*Peppy* libinput:name:SynPS/2 Synaptics TouchPad:dmi:*pn*ZGB* -libinput:name:Cypress APA Trackpad (cyapa):dmi:*pn*Parrot* -libinput:name:Cypress APA Trackpad (cyapa):dmi:*bvn*coreboot*:pn*Leon* -libinput:name:Cypress APA Trackpad (cyapa):dmi:*bvn*coreboot*:pn*Falco* -libinput:name:Cypress APA Trackpad (cyapa):dmi:*bvn*coreboot*:pn*Wolf* -libinput:name:Cypress APA Trackpad (cyapa):dmi:*svn*GOOGLE*:pn*Link* +libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*pn*Parrot* +libinput:name:Cypress APA
libinput: Changes to 'upstream-unstable'
configure.ac |4 - doc/t440-support.dox |2 doc/tablet-support.dox |3 src/evdev-mt-touchpad-buttons.c | 23 -- src/evdev-mt-touchpad-gestures.c |3 src/evdev-mt-touchpad.c |5 - src/evdev-tablet.c |4 - src/evdev.c |2 src/filter.c |2 src/libinput.c |2 src/libinput.h | 12 ++- test/tablet.c| 10 ++ test/trackpoint.c| 132 +++ 13 files changed, 175 insertions(+), 29 deletions(-) New commits: commit b3d41a8233c89eb1df4b1f9a0394da0f576467ae Author: Peter HuttererDate: Tue Apr 12 06:56:15 2016 +1000 configure.ac: libinput 1.2.3 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 7d73183..876786c 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [2]) -m4_define([libinput_micro_version], [2]) +m4_define([libinput_micro_version], [3]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=17:4:7 +LIBINPUT_LT_VERSION=17:5:7 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit ccc761d059c13cff1386a0fa7e356867fc55dd60 Author: Peter Hutterer Date: Mon Apr 11 07:18:07 2016 +1000 tablet: fix the airbrush slider range Supposed to be [-1, 1] but we only generated [0, 1] Reported-by: Carlos Garnacho Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Tested-by: Carlos Garnacho (cherry picked from commit 25a9f394fce25b093dce625128c2ddebed8020ec) diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index 9a1ac52..84563a8 100644 --- a/src/evdev-tablet.c +++ b/src/evdev-tablet.c @@ -201,7 +201,7 @@ normalize_dist_slider(const struct input_absinfo *absinfo) double range = absinfo->maximum - absinfo->minimum; double value = (absinfo->value - absinfo->minimum) / range; - return value; + return value * 2 - 1; } static inline double diff --git a/test/tablet.c b/test/tablet.c index ad6ac45..3999c3d 100644 --- a/test/tablet.c +++ b/test/tablet.c @@ -2532,7 +2532,7 @@ START_TEST(airbrush_tool) } END_TEST -START_TEST(airbrush_wheel) +START_TEST(airbrush_slider) { struct litest_device *dev = litest_current_device(); struct libinput *li = dev->libinput; @@ -2541,6 +2541,7 @@ START_TEST(airbrush_wheel) const struct input_absinfo *abs; double val; double scale; + double expected; int v; if (!libevdev_has_event_code(dev->evdev, @@ -2574,7 +2575,10 @@ START_TEST(airbrush_wheel) ck_assert(libinput_event_tablet_tool_slider_has_changed(tev)); val = libinput_event_tablet_tool_get_slider_position(tev); - ck_assert_int_eq(val, (v - abs->minimum)/scale); + expected = ((v - abs->minimum)/scale) * 2 - 1; + ck_assert_double_eq(val, expected); + ck_assert_double_ge(val, -1.0); + ck_assert_double_le(val, 1.0); libinput_event_destroy(event); litest_assert_empty_queue(li); } @@ -3655,7 +3659,7 @@ litest_setup_tests(void) litest_add("tablet:mouse", mouse_rotation, LITEST_TABLET, LITEST_ANY); litest_add("tablet:mouse", mouse_wheel, LITEST_TABLET, LITEST_WHEEL); litest_add("tablet:airbrush", airbrush_tool, LITEST_TABLET, LITEST_ANY); - litest_add("tablet:airbrush", airbrush_wheel, LITEST_TABLET, LITEST_ANY); + litest_add("tablet:airbrush", airbrush_slider, LITEST_TABLET, LITEST_ANY); litest_add("tablet:artpen", artpen_tool, LITEST_TABLET, LITEST_ANY); litest_add("tablet:artpen", artpen_rotation, LITEST_TABLET, LITEST_ANY); commit 364e0bb131b204252300f77909dbd6db92fdbc2a Author: Jonas Ã…dahl Date: Fri Apr 8 15:51:27 2016 +0800 libinput: Actually return the default accel profile We just returned the current profile instead of the default one. Fix that. Signed-off-by: Jonas Ã…dahl Signed-off-by: Peter Hutterer (cherry picked from commit ee6501d12f773d7b4a67a23463b91a3ce741b6a7) diff --git a/src/libinput.c b/src/libinput.c index 1480878..b6e660a 100644 --- a/src/libinput.c
xserver-xorg-input-libinput: Changes to 'upstream-unstable'
configure.ac |2 src/xf86libinput.c | 481 - 2 files changed, 476 insertions(+), 7 deletions(-) New commits: commit 13726f404f872b8baee507e6b3d4931f1bda2254 Author: Peter HuttererDate: Thu Apr 7 13:31:28 2016 +1000 xf86-input-libinput 0.18.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index cdb8aed..722411b 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], -[0.17.0], +[0.18.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) commit 5e7ee73fe24d53cba6a915223be53e0abcdaa70d Author: Peter Hutterer Date: Thu Dec 3 15:58:49 2015 +1000 Support art pen rotation The art pen is a normal pen, but it does provide a rotation axis. Signed-off-by: Peter Hutterer diff --git a/src/xf86libinput.c b/src/xf86libinput.c index 505c9b6..bc5d685 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -818,6 +818,12 @@ xf86libinput_init_tablet_pen_or_eraser(InputInfoPtr pInfo, min, max, res * 1000, 0, res * 1000, Absolute); } + min = -TABLET_AXIS_MAX; + max = TABLET_AXIS_MAX; + if (libinput_tablet_tool_has_rotation(tool)) + xf86InitValuatorAxisStruct(dev, axis++, + XIGetKnownProperty(AXIS_LABEL_PROP_ABS_RZ), + min, max, res * 1000, 0, res * 1000, Absolute); return axis; } @@ -1358,9 +1364,27 @@ xf86libinput_handle_tablet_axis(InputInfoPtr pInfo, } if (libinput_tablet_tool_has_rotation(tool)) { + int valuator; + value = libinput_event_tablet_tool_get_rotation(event); value *= TABLET_AXIS_MAX; - valuator_mask_set_double(mask, 3, value); + + switch (libinput_tablet_tool_get_type(tool)) { + case LIBINPUT_TABLET_TOOL_TYPE_PEN: + case LIBINPUT_TABLET_TOOL_TYPE_ERASER: + valuator = 5; + break; + case LIBINPUT_TABLET_TOOL_TYPE_MOUSE: + case LIBINPUT_TABLET_TOOL_TYPE_LENS: + valuator = 3; + break; + default: + xf86IDrvMsg(pInfo, X_ERROR, + "Invalid rotation axis on tool\n"); + break; + } + + valuator_mask_set_double(mask, valuator, value); } xf86PostMotionEventM(dev, Absolute, mask); commit 4564a92d59be39378170a2254ae1affb151a4757 Author: Peter Hutterer Date: Thu Dec 3 15:41:30 2015 +1000 Support the mouse/lens tool Signed-off-by: Peter Hutterer diff --git a/src/xf86libinput.c b/src/xf86libinput.c index 0b7dfaf..505c9b6 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -851,6 +851,39 @@ xf86libinput_init_tablet_airbrush(InputInfoPtr pInfo, } static void +xf86libinput_init_tablet_mouse(InputInfoPtr pInfo, + struct libinput_tablet_tool *tool) +{ + DeviceIntPtr dev = pInfo->dev; + int min, max, res; + int axis; + + if (!libinput_tablet_tool_has_rotation(tool)) { + xf86IDrvMsg(pInfo, X_ERROR, "Mouse tool is missing the rotation axis\n"); + return; + } + + min = 0; + max = TABLET_AXIS_MAX; + res = 0; + + /* The mouse/lens tool don't have pressure, but for backwards-compat + with the xorg wacom driver we initialize the the axis anyway */ + axis = 2; + xf86InitValuatorAxisStruct(dev, axis, + XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE), + min, max, res * 1000, 0, res * 1000, Absolute); + + axis = 3; + min = -TABLET_AXIS_MAX; + max = TABLET_AXIS_MAX; + xf86InitValuatorAxisStruct(dev, axis, + XIGetKnownProperty(AXIS_LABEL_PROP_ABS_RZ), + min, max, res * 1000, 0, res * 1000, Absolute); + return; +} + +static void xf86libinput_init_tablet(InputInfoPtr pInfo) { DeviceIntPtr dev = pInfo->dev; @@ -875,6 +908,8 @@ xf86libinput_init_tablet(InputInfoPtr pInfo) naxes += 2; if (libinput_tablet_tool_has_slider(tool)) naxes++; + if (libinput_tablet_tool_has_rotation(tool)) + naxes++; InitPointerDeviceStruct((DevicePtr)dev, driver_data->options.btnmap, @@ -903,6 +938,10 @@
libinput: Changes to 'upstream-unstable'
configure.ac |4 - src/evdev-mt-touchpad-gestures.c |1 src/evdev-mt-touchpad.c| 34 +-- src/evdev-mt-touchpad.h| 12 + src/evdev-tablet.c | 82 ++--- src/evdev-tablet.h |2 src/evdev.c|1 src/evdev.h|1 src/libinput.c |3 + test/path.c| 60 +++ test/udev.c|5 -- udev/90-libinput-model-quirks.hwdb |7 +++ 12 files changed, 168 insertions(+), 44 deletions(-) New commits: commit ae7b2f77720f19ce3b6924bb3ecf706cabd17587 Author: Peter HuttererDate: Tue Mar 15 10:23:42 2016 +1000 configure.ac: libinput 1.2.2 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 71255ed..7d73183 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [2]) -m4_define([libinput_micro_version], [1]) +m4_define([libinput_micro_version], [2]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=17:3:7 +LIBINPUT_LT_VERSION=17:4:7 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit a608d9dc2c70c7915fc94466ed27c1684f65409e Author: Peter Hutterer Date: Mon Mar 7 16:05:25 2016 +1000 touchpad: add quirk for the T450 and T460 generation hardware The touchpad's sensors are too far apart (or the firmware interferes), causing in a jerky movement visible especially on slow motion. We get a bunch of normal motion events, then only ABS_MT_PRESSURE updates without x/y updates. After about one mm of movement x/y updates resume, with the first event covering the distance between the last motion event. That event is usually accelerated and thus causes a large jump. Subsequent events are sufficiently fine-grained again. This patch counts the number of non-motion events. Once we hit 10 in a row, we mark the first motion update as non-dirty, effectively discarding the motion and thus stopping the pointer jumps. https://bugs.freedesktop.org/show_bug.cgi?id=94379 Signed-off-by: Peter Hutterer Tested-by: Benjamin Tissoires diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 00d6539..d0a8e27 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -337,7 +337,7 @@ tp_process_absolute(struct tp_dispatch *tp, case ABS_MT_PRESSURE: t->pressure = e->value; t->dirty = true; - tp->queued |= TOUCHPAD_EVENT_MOTION; + tp->queued |= TOUCHPAD_EVENT_OTHERAXIS; break; } } @@ -880,8 +880,10 @@ tp_position_fake_touches(struct tp_dispatch *tp) } static inline bool -tp_need_motion_history_reset(struct tp_dispatch *tp) +tp_need_motion_history_reset(struct tp_dispatch *tp, uint64_t time) { + bool rc = false; + /* semi-mt finger postions may "jump" when nfingers changes */ if (tp->semi_mt && tp->nfingers_down != tp->old_nfingers_down) return true; @@ -894,7 +896,29 @@ tp_need_motion_history_reset(struct tp_dispatch *tp) tp->old_nfingers_down > tp->num_slots)) return true; - return false; + /* Quirk: if we had multiple events without x/y axis + information, the next x/y event is going to be a jump. So we + reset that touch to non-dirty effectively swallowing that event + and restarting with the next event again. +*/ + if (tp->device->model_flags & EVDEV_MODEL_LENOVO_T450_TOUCHPAD) { + if (tp->queued & TOUCHPAD_EVENT_MOTION) { + if (tp->quirks.nonmotion_event_count > 10) { + struct tp_touch *t; + + tp_for_each_touch(tp, t) + t->dirty = false; + rc = true; + } + tp->quirks.nonmotion_event_count = 0; + } + + if ((tp->queued & (TOUCHPAD_EVENT_OTHERAXIS|TOUCHPAD_EVENT_MOTION)) == + TOUCHPAD_EVENT_OTHERAXIS) + tp->quirks.nonmotion_event_count++; + } + + return rc; } static void @@ -909,7 +933,7 @@ tp_process_state(struct
xserver-xorg-input-libinput: Changes to 'upstream-unstable'
configure.ac |4 include/libinput-properties.h |6 + man/libinput.man |8 + src/xf86libinput.c| 177 ++ 4 files changed, 178 insertions(+), 17 deletions(-) New commits: commit 8136113139dd2a27fcfa4552da89aa110bc8fbe3 Author: Peter HuttererDate: Fri Feb 26 15:57:48 2016 +1000 xf86-input-libinput 0.17.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 6fc95e3..cdb8aed 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], -[0.16.0], +[0.17.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) commit 202eb68dc061510d57900d29b3a76fe2ed811998 Author: Peter Hutterer Date: Thu Jan 28 15:02:54 2016 +1000 Fix compiler warnings about missing tablet event cases Signed-off-by: Peter Hutterer diff --git a/src/xf86libinput.c b/src/xf86libinput.c index b520b26..32bc9f8 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -1131,6 +1131,11 @@ xf86libinput_handle_event(struct libinput_event *event) case LIBINPUT_EVENT_GESTURE_PINCH_UPDATE: case LIBINPUT_EVENT_GESTURE_PINCH_END: break; + case LIBINPUT_EVENT_TABLET_TOOL_AXIS: + case LIBINPUT_EVENT_TABLET_TOOL_BUTTON: + case LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY: + case LIBINPUT_EVENT_TABLET_TOOL_TIP: + break; } } commit e8f5394b0734db41abd15ab72457aea99c25d9ab Author: Peter Hutterer Date: Wed Jan 27 11:04:40 2016 +1000 Add property/option for enabling/disabling tap-n-drag Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede diff --git a/configure.ac b/configure.ac index 67bebdc..6fc95e3 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,7 @@ XORG_DEFAULT_OPTIONS # Obtain compiler/linker options from server and required extensions PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto [inputproto >= 2.2]) -PKG_CHECK_MODULES(LIBINPUT, [libinput >= 1.0.901]) +PKG_CHECK_MODULES(LIBINPUT, [libinput >= 1.1.901]) # Define a configure option for an alternate input module directory AC_ARG_WITH(xorg-module-dir, diff --git a/include/libinput-properties.h b/include/libinput-properties.h index 098ce48..d117729 100644 --- a/include/libinput-properties.h +++ b/include/libinput-properties.h @@ -30,6 +30,12 @@ /* Tapping default enabled/disabled: BOOL, 1 value, read-only */ #define LIBINPUT_PROP_TAP_DEFAULT "libinput Tapping Enabled Default" +/* Tap drag enabled/disabled: BOOL, 1 value */ +#define LIBINPUT_PROP_TAP_DRAG "libinput Tapping Drag Enabled" + +/* Tap drag default enabled/disabled: BOOL, 1 value */ +#define LIBINPUT_PROP_TAP_DRAG_DEFAULT "libinput Tapping Drag Enabled Default" + /* Tap drag lock enabled/disabled: BOOL, 1 value */ #define LIBINPUT_PROP_TAP_DRAG_LOCK "libinput Tapping Drag Lock Enabled" diff --git a/man/libinput.man b/man/libinput.man index b6f476e..43beda7 100644 --- a/man/libinput.man +++ b/man/libinput.man @@ -129,6 +129,14 @@ mouse is connected". .BI "Option \*qTapping\*q \*q" bool \*q Enables or disables tap-to-click behavior. .TP 7 +.BI "Option \*qTappingDrag\*q \*q" bool \*q +Enables or disables drag during tapping behavior ("tap-and-drag"). When +enabled, a tap followed by a finger held down causes a single button down +only, all motions of that finger thus translate into dragging motion. +Tap-and-drag requires option +.B Tapping +to be enabled. +.TP 7 .BI "Option \*qTappingDragLock\*q \*q" bool \*q Enables or disables drag lock during tapping behavior. When enabled, a finger up during tap-and-drag will not immediately release the button. If diff --git a/src/xf86libinput.c b/src/xf86libinput.c index fd07cf3..b520b26 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -112,6 +112,7 @@ struct xf86libinput { struct options { BOOL tapping; + BOOL tap_drag; BOOL tap_drag_lock; BOOL natural_scrolling; BOOL left_handed; @@ -386,6 +387,13 @@ LibinputApplyConfig(DeviceIntPtr dev) "Failed to set Tapping DragLock to %d\n", driver_data->options.tap_drag_lock); + if (libinput_device_config_tap_get_finger_count(device) > 0 && + libinput_device_config_tap_set_drag_enabled(device, + driver_data->options.tap_drag) != LIBINPUT_CONFIG_STATUS_SUCCESS) + xf86IDrvMsg(pInfo, X_ERROR, + "Failed to set
libinput: Changes to 'upstream-unstable'
Rebased ref, commits from common ancestor: commit 45e5847bf3e755532b2b6a62b74b85fcdadf2e36 Author: Peter HuttererDate: Tue Feb 23 16:13:03 2016 +1000 configure.ac: libinput 1.2.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 3eec57d..d400f21 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) -m4_define([libinput_minor_version], [1]) -m4_define([libinput_micro_version], [902]) +m4_define([libinput_minor_version], [2]) +m4_define([libinput_micro_version], [0]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=17:1:7 +LIBINPUT_LT_VERSION=17:2:7 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 0e17dc58aa2469909d9e21d889ff119b6170e15a Author: Peter Hutterer Date: Thu Feb 18 09:42:27 2016 +1000 tablet: use the tilt resolution if we have it A nonzero resolution on the tilt axes is units/rad so we can calculate the physical min/max based. Uneven min/max ranges are supported. Signed-off-by: Peter Hutterer Reviewed-by: Jason Gerecke diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index 1e5c2cd..22ea1eb 100644 --- a/src/evdev-tablet.c +++ b/src/evdev-tablet.c @@ -231,16 +231,25 @@ adjust_tilt(const struct input_absinfo *absinfo) double value = (absinfo->value - absinfo->minimum) / range; const int WACOM_MAX_DEGREES = 64; - /* Map to the (-1, 1) range */ - value = (value * 2) - 1; - - /* Wacom supports physical [-64, 64] degrees, so map to that by -* default. If other tablets have a different physical range or -* nonzero physical offsets, they need extra treatment -* here. -*/ + /* If resolution is nonzero, it's in units/radian. But require +* a min/max less/greater than zero so we can assume 0 is the +* center */ + if (absinfo->resolution != 0 && + absinfo->maximum > 0 && + absinfo->minimum < 0) { + value = 180.0/M_PI * absinfo->value/absinfo->resolution; + } else { + /* Wacom supports physical [-64, 64] degrees, so map to that by +* default. If other tablets have a different physical range or +* nonzero physical offsets, they need extra treatment +* here. +*/ + /* Map to the (-1, 1) range */ + value = (value * 2) - 1; + value *= WACOM_MAX_DEGREES; + } - return value * WACOM_MAX_DEGREES; + return value; } static inline int32_t diff --git a/test/tablet.c b/test/tablet.c index c5dc892..ad6ac45 100644 --- a/test/tablet.c +++ b/test/tablet.c @@ -3298,7 +3298,8 @@ START_TEST(tilt_x) ck_assert_double_ge(tx, -52); ty = libinput_event_tablet_tool_get_tilt_y(tev); - ck_assert_double_eq(ty, -64); + ck_assert_double_ge(ty, -65); + ck_assert_double_lt(ty, -63); libinput_event_destroy(event); @@ -3320,7 +3321,8 @@ START_TEST(tilt_x) ck_assert_double_le(tx, expected_tx + 2); ty = libinput_event_tablet_tool_get_tilt_y(tev); - ck_assert_double_eq(ty, -64); + ck_assert_double_ge(ty, -65); + ck_assert_double_lt(ty, -63); libinput_event_destroy(event); @@ -3365,7 +3367,8 @@ START_TEST(tilt_y) ck_assert_double_ge(ty, -52); tx = libinput_event_tablet_tool_get_tilt_x(tev); - ck_assert_double_eq(tx, -64); + ck_assert_double_ge(tx, -65); + ck_assert_double_lt(tx, -63); libinput_event_destroy(event); @@ -3387,7 +3390,8 @@ START_TEST(tilt_y) ck_assert_double_le(ty, expected_ty + 2); tx = libinput_event_tablet_tool_get_tilt_x(tev); - ck_assert_double_eq(tx, -64); + ck_assert_double_ge(tx, -65); + ck_assert_double_lt(tx, -63); libinput_event_destroy(event); commit 79139ebcd1cc81eecdd2d0dc6f006fbec4c2c6f2 Author: Peter Hutterer Date: Mon Feb 15 17:02:45 2016 +1000 touchpad: move the tapping exclusion zone to the top edge of the button We previously used the half-way mark of the touchpad's y axis to decide where to ignore tapping. Move this down to the top edge of the software buttons instead. Users may tap with a finger in the software button areas, on the rest of the
libinput: Changes to 'upstream-unstable'
configure.ac |4 +- src/evdev-mt-touchpad.c| 12 +++--- src/evdev.c|1 src/evdev.h|1 test/touchpad.c| 68 + udev/90-libinput-model-quirks.hwdb |8 +++- udev/libinput-model-quirks.c |6 +-- 7 files changed, 88 insertions(+), 12 deletions(-) New commits: commit ee8f7d52015b86bb4910df4d855b39a67246df5e Author: Peter HuttererDate: Wed Feb 10 08:22:50 2016 +1000 configure.ac: libinput 1.1.7 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 4a0..31b54a6 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [1]) -m4_define([libinput_micro_version], [6]) +m4_define([libinput_micro_version], [7]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=16:6:6 +LIBINPUT_LT_VERSION=16:7:6 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit de3a6075e72d41b87770ea2297402e13207f1dab Author: Peter Hutterer Date: Tue Feb 9 10:43:45 2016 +1000 touchpad: init a default hysteresis for ALPS rushmore touchpads https://bugs.freedesktop.org/show_bug.cgi?id=90590 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede (cherry picked from commit 07420eec05408e164de2db623bbbf778daad5616) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index d0bc52d..1f07017 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -1983,7 +1983,8 @@ tp_init_hysteresis(struct tp_dispatch *tp) res_x = tp->device->abs.absinfo_x->resolution; res_y = tp->device->abs.absinfo_y->resolution; - if (tp->device->model_flags & EVDEV_MODEL_CYAPA) { + if (tp->device->model_flags & + (EVDEV_MODEL_CYAPA|EVDEV_MODEL_ALPS_RUSHMORE)) { tp->hysteresis_margin.x = res_x/2; tp->hysteresis_margin.y = res_y/2; } else { diff --git a/src/evdev.c b/src/evdev.c index 281a2a0..0ee86f5 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1665,6 +1665,7 @@ evdev_read_model_flags(struct evdev_device *device) { "LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD", EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD }, { "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT }, { "LIBINPUT_MODEL_CYAPA", EVDEV_MODEL_CYAPA }, + { "LIBINPUT_MODEL_ALPS_RUSHMORE", EVDEV_MODEL_ALPS_RUSHMORE }, { NULL, EVDEV_MODEL_DEFAULT }, }; const struct model_map *m = model_map; diff --git a/src/evdev.h b/src/evdev.h index 96bf621..64fbf10 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -111,6 +111,7 @@ enum evdev_device_model { EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13), EVDEV_MODEL_CYBORG_RAT = (1 << 14), EVDEV_MODEL_CYAPA = (1 << 15), + EVDEV_MODEL_ALPS_RUSHMORE = (1 << 16), }; struct mt_slot { diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index 6225da1..eb2859e 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -26,6 +26,10 @@ libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:800 libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800 LIBINPUT_ATTR_SIZE_HINT=100x55 +libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:310 +libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:310 + LIBINPUT_MODEL_ALPS_RUSHMORE=1 + ## # Apple ## diff --git a/udev/libinput-model-quirks.c b/udev/libinput-model-quirks.c index c8baae7..2dc917d 100644 --- a/udev/libinput-model-quirks.c +++ b/udev/libinput-model-quirks.c @@ -64,7 +64,7 @@ handle_touchpad_alps(struct udev_device *device) return; /* ALPS' firmware version is the version */ - if (pid) + if (version) printf("LIBINPUT_MODEL_FIRMWARE_VERSION=%x\n", version); } commit 6c44e5e5fb6cd8f6843d32b719df145a6a64d345 Author: Peter Hutterer Date: Tue Feb 9 10:37:42 2016 +1000 udev: fix ALPS firmware detection The firmware version is in id.version, not id.model which is always PSMOUSE_ALPS for ALPS devices. The various fw versions are listed in /drivers/input/mouse/alps.h and are all hex numbers. Version 8 is actually 0x800, change the match
libinput: Changes to 'upstream-unstable'
configure.ac |4 doc/normalization-of-relative-motion.dox |4 src/evdev-mt-touchpad-gestures.c | 59 +--- src/evdev-mt-touchpad.c | 118 +++-- src/evdev-mt-touchpad.h |1 src/evdev.c | 41 +++ src/evdev.h |3 src/libinput-util.h | 15 + test/Makefile.am |5 test/device.c| 64 + test/gestures.c | 34 +- test/litest-device-anker-mouse-kbd.c | 225 ++ test/litest-device-apple-internal-keyboard.c | 239 +++ test/litest-device-cyborg-rat-5.c| 71 + test/litest-device-synaptics-i2c.c | 102 test/litest-device-yubikey.c | 169 + test/litest-selftest.c |4 test/litest.c| 15 + test/litest.h| 15 - test/touchpad-tap.c |2 test/touchpad.c | 333 +-- udev/90-libinput-model-quirks.hwdb | 13 + udev/90-libinput-model-quirks.rules.in |4 23 files changed, 1423 insertions(+), 117 deletions(-) New commits: commit b0c5296b245039d3c158bf2da5410432cef4701f Author: Peter HuttererDate: Fri Feb 5 09:59:32 2016 +1000 configure.ac: libinput 1.1.6 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index f75652f..4a0 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [1]) -m4_define([libinput_micro_version], [5]) +m4_define([libinput_micro_version], [6]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=16:5:6 +LIBINPUT_LT_VERSION=16:6:6 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit c7b064d7560208fcb263f05c448952523a048297 Author: Peter Hutterer Date: Thu Feb 4 11:20:38 2016 +1000 touchpad: if we have a serio keyboard, override any previous dwt pairing If a USB keyboard like the YubiKey is found before the internal keyboard, it will be paired with the touchpad when it is seen. The internal keyboard is seen later bug ignored because we already have a keyboard paired with the touchpad. This is obviously wrong. For now, give priority to serio keyboards, and override existing dwt pairings with the new keyboard. https://bugs.freedesktop.org/show_bug.cgi?id=93983 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede (cherry picked from commit 0b0150e08d4e3e88d7a81a7429306d8dca2fe4c8) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index ed86ef9..91fb7a9 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -1325,6 +1325,38 @@ tp_want_dwt(struct evdev_device *touchpad, } static void +tp_dwt_pair_keyboard(struct evdev_device *touchpad, +struct evdev_device *keyboard) +{ + struct tp_dispatch *tp = (struct tp_dispatch*)touchpad->dispatch; + unsigned int bus_kbd = libevdev_get_id_bustype(keyboard->evdev); + + if (!tp_want_dwt(touchpad, keyboard)) + return; + + /* If we already have a keyboard paired, override it if the new one +* is a serio device. Otherwise keep the current one */ + if (tp->dwt.keyboard) { + if (bus_kbd != BUS_I8042) + return; + + memset(tp->dwt.key_mask, 0, sizeof(tp->dwt.key_mask)); + libinput_device_remove_event_listener(>dwt.keyboard_listener); + } + + libinput_device_add_event_listener(>base, + >dwt.keyboard_listener, + tp_keyboard_event, tp); + tp->dwt.keyboard = keyboard; + tp->dwt.keyboard_active = false; + + log_debug(touchpad->base.seat->libinput, + "palm: dwt activated with %s<->%s\n", + touchpad->devname, + keyboard->devname); +} + +static void tp_interface_device_added(struct evdev_device *device, struct evdev_device *added_device) { @@ -1348,20 +1380,8 @@ tp_interface_device_added(struct evdev_device *device,
libinput: Changes to 'upstream-unstable'
configure.ac |4 +- src/evdev.c| 15 ++ src/libinput.h |2 + test/misc.c| 83 + 4 files changed, 102 insertions(+), 2 deletions(-) New commits: commit a340736e9b9399f630ff4b436930c1dee26cb803 Author: Peter HuttererDate: Tue Dec 22 11:18:07 2015 +1000 configure.ac: libinput 1.1.4 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 92f3e22..711aa42 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [1]) -m4_define([libinput_micro_version], [3]) +m4_define([libinput_micro_version], [4]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=16:3:6 +LIBINPUT_LT_VERSION=16:4:6 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 7ca6a7b13cf92776846bef866e5d73beac43fc99 Author: Peter Hutterer Date: Tue Dec 22 11:03:55 2015 +1000 doc: add missing @config tag to libinput_config_send_event_modes Signed-off-by: Peter Hutterer diff --git a/src/libinput.h b/src/libinput.h index 9057446..79d6e90 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -2371,6 +2371,8 @@ libinput_device_config_calibration_get_default_matrix(struct libinput_device *de float matrix[6]); /** + * @ingroup config + * * The send-event mode of a device defines when a device may generate events * and pass those events to the caller. */ commit 30df66d0a6dfd36f760a32394d5ddb8a45a92403 Author: Peter Hutterer Date: Wed Dec 16 10:48:39 2015 +1000 evdev: drain any pending evdev events on a device open_restricted() doesn't always mean 'open the fd'. When the X server uses systemd-logind, the fd is opened once before PreInit and then kept open across devices being disabled and enabled through the protocol. When the device is re-enabled and libinput_path_add_device is called for the device, we may have events pending on the fd, leaking information that we should just ignore. There's also the potential of inconsistent state. The kernel updates the device state whenever it processes an event, the evdev ioctls return that state. If events are pending, the state we see is newer than the events we process immediately after initialization. That can lead to confusion. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede diff --git a/src/evdev.c b/src/evdev.c index 9fecdc4..3708072 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2202,6 +2202,17 @@ evdev_set_device_group(struct evdev_device *device, return 0; } +static inline void +evdev_drain_fd(int fd) +{ + struct input_event ev[24]; + size_t sz = sizeof ev; + + while (read(fd, , sz) == (int)sz) { + /* discard all pending events */ + } +} + struct evdev_device * evdev_device_create(struct libinput_seat *seat, struct udev_device *udev_device) @@ -2235,6 +2246,8 @@ evdev_device_create(struct libinput_seat *seat, libinput_device_init(>base, seat); libinput_seat_ref(seat); + evdev_drain_fd(fd); + rc = libevdev_new_from_fd(fd, >evdev); if (rc != 0) goto err; @@ -2682,6 +2695,8 @@ evdev_device_resume(struct evdev_device *device) return -ENODEV; } + evdev_drain_fd(fd); + device->fd = fd; if (evdev_need_mtdev(device)) { diff --git a/test/misc.c b/test/misc.c index 89edb14..b962cc5 100644 --- a/test/misc.c +++ b/test/misc.c @@ -693,6 +693,87 @@ START_TEST(time_conversion) } END_TEST +static int open_restricted_leak(const char *path, int flags, void *data) +{ + return *(int*)data; +} + +static void close_restricted_leak(int fd, void *data) +{ + /* noop */ +} + +const struct libinput_interface leak_interface = { + .open_restricted = open_restricted_leak, + .close_restricted = close_restricted_leak, +}; + +static void +simple_log_handler(struct libinput *libinput, + enum libinput_log_priority priority, + const char *format, + va_list args) +{ + vfprintf(stderr, format, args); +} + +START_TEST(fd_no_event_leak) +{ + struct libevdev_uinput *uinput; + struct libinput *li; + struct libinput_device *device; + int fd =
xserver-xorg-input-libinput: Changes to 'upstream-unstable'
configure.ac |2 src/xf86libinput.c | 525 - 2 files changed, 444 insertions(+), 83 deletions(-) New commits: commit 0d1851a000c5a80ba9b5787f516d2d72c62ce35e Author: Peter HuttererDate: Wed Dec 23 13:53:38 2015 +1000 xf86-input-libinput 0.16.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 268e030..67bebdc 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], -[0.15.0], +[0.16.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) commit ad8483b91387e99282a9b5a8360e8de7eed70257 Author: Peter Hutterer Date: Tue Dec 15 13:20:55 2015 +1000 Drain the fd after opening Make sure we don't send any events that may have been enqueued before we initialized ourselves. Specifically, if we're using systemd-logind the fd remains open when we disable/enable the device, allowing events to queue up on the fd. These events are then replayed once the device is re-opened. This is not the case when VT-switching, in that case logind closes the fd for us. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard diff --git a/src/xf86libinput.c b/src/xf86libinput.c index ee2165a..7008fac 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -1175,7 +1175,12 @@ open_restricted(const char *path, int flags, void *data) } fd = xf86OpenSerial(pInfo->options); - return fd < 0 ? -errno : fd; + if (fd < 0) + return -errno; + + xf86FlushInput(fd); + + return fd; } static void commit 1f43f3921f6ceebd9a0cb92ef998a930d5fc3a3e Author: Peter Hutterer Date: Wed Nov 11 10:10:58 2015 +1000 Split mixed pointer/keyboard devices into two separate X devices The server struggles with devices that are both, the protocol (especially XI2) requires a fairly strict separation of pointer vs keyboard devices. Though the server has a couple of hacks to route events correctly, mixed devices still experience bugs like [1]. Instead of advertising the device as a single mixed device, split the device into two X devices, one with only a pointer/touch component, one with only a keyboard component. This ensures that the device is effectively attached to both the VCP and the VCK, something the XI2 protocol doesn't really allow. This patch drops the keyboard capability on a mixed device, duplicates the input options and attributes and queues a NewInputDeviceRequest call. The new device only has the keyboard capability but is otherwise unchanged. The wacom driver has used this approach for years. The WorkProc is necessary to avoid inconsistent state, the server doesn't handle a NewInputDeviceRequest during PreInit well. The approach: During pre-init we create a struct xf86libinput_device with the libinput_device and a unique ID. The child device has that ID added to the options and will look for the other device during its pre-init. The two devices then share the xf86libinput_device struct. We only have a single epollfd for all devices and the server calls read_input on the first device in the list with the epollfd as pInfo->fd. That shared struct is used as the userdata on the libinput_device we get back from the event, and each device is in the xorg_list device_list of that shared struct. We loop through those to find the ones with the right capabilities and post the event through that device. Since devices can be enabled and disabled independently, the rest of the code makes sure that we only ever add the device to libinput when the first shared device is enabled, and remove it accordingly. The server uses pInfo->major/minor to detect if another device is using the same path for a logind-controlled fd. If so, it reuses that device's pInfo->fd and sets the "fd" option to that value. That pInfo->fd is the libinput epollfd though, not the actual device fd. This doesn't matter for us, since we manage the fds largely ourselves and the pInfo->fd we use is the epollfd anyway. On unplug however, the udev code triggers a device removal for all devices, including the duplicated ones. When we disable device, we restore the pInfo->fd from the "fd" option so that the server can request logind to close the fd. That only works if the "fd" option is correct, otherwise the server asks logind to close the epollfd and everyone is unhappy. [1] https://bugs.freedesktop.org/show_bug.cgi?id=49950
libinput: Changes to 'upstream-unstable'
configure.ac |4 +-- doc/device-configuration-via-udev.dox | 18 +++ src/evdev-mt-touchpad.c |3 +- src/evdev.c |1 src/evdev.h |1 src/libinput-util.h |2 - test/litest.c | 40 +- test/litest.h | 17 ++ test/touchpad.c | 22 +- udev/90-libinput-model-quirks.hwdb| 12 ++ 10 files changed, 95 insertions(+), 25 deletions(-) New commits: commit 6922adba058c5adc27161700835208415ad8818f Author: Peter HuttererDate: Wed Dec 16 07:19:30 2015 +1000 configure.ac: libinput 1.1.3 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 51350bb..92f3e22 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [1]) -m4_define([libinput_micro_version], [2]) +m4_define([libinput_micro_version], [3]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=16:2:6 +LIBINPUT_LT_VERSION=16:3:6 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 53c28a7d75a0a22bc96d780b9082fd6d8d3ed741 Author: Peter Hutterer Date: Fri Dec 11 11:10:25 2015 +1000 touchpad: add a special quirk for the Lenovo x220 with updated firmware If an x220 is updated to the touchpad firmware version 8.1, the touchpad suffers from the same issues as the x230 and needs custom acceleration code. Unfortunately we cannot detect this otherwise, so it is left to the user as a custom hwdb setting. https://bugzilla.redhat.com/show_bug.cgi?id=1264453 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede diff --git a/doc/device-configuration-via-udev.dox b/doc/device-configuration-via-udev.dox index 85c5c9c..6e9a3dc 100644 --- a/doc/device-configuration-via-udev.dox +++ b/doc/device-configuration-via-udev.dox @@ -117,4 +117,22 @@ defaults or any other reason. The effects of setting these properties, the format of the property and the value of the property are subject to change at any time. +@subsection model_specific_configuration_x220fw81 Lenovo x220 with touchpad firmware v8.1 + +The property LIBINPUT_MODEL_LENOVO_X220_TOUCHPAD_FW81 may be set by a +user in a local hwdb file. This property designates the touchpad on a Lenovo +x220 with a touchpad firmware version 8.1. When this firmware version is +installed, the touchpad is imprecise. The touchpad device does not send +continuos x/y axis position updates, a behavior also observed on its +successor model, the Lenovo x230 which has the same firmware version. If the +above property is set, libinput adjusts its behavior to better suit this +particular model. + +The touchpad firmware version cannot be detected automatically by libinput, +local configuration is required to set this property. Refer to the libinput +model quirks hwdb for instructions. + +This property must not be used for any other purpose, no specific behavior +is guaranteed. + */ diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 4fba147..d78a54b 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -1565,7 +1565,8 @@ tp_init_accel(struct tp_dispatch *tp, double diagonal) tp->accel.x_scale_coeff = (DEFAULT_MOUSE_DPI/25.4) / res_x; tp->accel.y_scale_coeff = (DEFAULT_MOUSE_DPI/25.4) / res_y; - if (tp->device->model_flags & EVDEV_MODEL_LENOVO_X230) + if (tp->device->model_flags & EVDEV_MODEL_LENOVO_X230 || + tp->device->model_flags & EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81) filter = create_pointer_accelerator_filter_lenovo_x230(tp->device->dpi); else filter = create_pointer_accelerator_filter_touchpad(tp->device->dpi); diff --git a/src/evdev.c b/src/evdev.c index 55641c5..9fecdc4 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1650,6 +1650,7 @@ evdev_read_model_flags(struct evdev_device *device) enum evdev_device_model model; } model_map[] = { { "LIBINPUT_MODEL_LENOVO_X230", EVDEV_MODEL_LENOVO_X230 }, + { "LIBINPUT_MODEL_LENOVO_X220_TOUCHPAD_FW81", EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 }, { "LIBINPUT_MODEL_CHROMEBOOK", EVDEV_MODEL_CHROMEBOOK }, { "LIBINPUT_MODEL_SYSTEM76_BONOBO",
libinput: Changes to 'upstream-unstable'
configure.ac |4 doc/palm-detection.dox |5 doc/svg/edge-scrolling.svg |2 doc/svg/twofinger-scrolling.svg |2 src/evdev-mt-touchpad-gestures.c |2 src/evdev-mt-touchpad.c |3 src/evdev.c | 62 +++-- src/libinput.c |2 test/Makefile.am |2 test/gestures.c |8 test/litest-device-asus-rog-gladius.c| 334 +++ test/litest-device-mouse-wheel-click-angle.c | 74 + test/litest.c| 25 +- test/litest.h|2 test/pointer.c | 34 ++ test/touchpad.c | 77 ++ tools/event-debug.c | 18 - 17 files changed, 613 insertions(+), 43 deletions(-) New commits: commit f5d0b9b99b16c3e72b2a6851a14b49a30106cbb9 Author: Peter HuttererDate: Wed Dec 9 09:08:10 2015 +1000 configure.ac: libinput 1.1.2 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index c841a5f..51350bb 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [1]) -m4_define([libinput_micro_version], [1]) +m4_define([libinput_micro_version], [2]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=16:1:6 +LIBINPUT_LT_VERSION=16:2:6 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit 147162da696715fbe7f9c19b31472c090cedc721 Author: Peter Hutterer Date: Fri Dec 4 15:52:17 2015 +1000 touchpad: don't set the axis for a 0.0 value in a scroll event Once we trigger diagonal scrolling, the device's scroll direction is set as horiz+vert. From then on, both axes will be set on every subsequent scroll event, even when the actual delta for an axis is 0. This causes continuous scroll stop events in clients that care about these things. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede diff --git a/src/evdev.c b/src/evdev.c index 4933185..55641c5 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2548,9 +2548,16 @@ evdev_post_scroll(struct evdev_device *device, if (!normalized_is_zero(event)) { const struct discrete_coords zero_discrete = { 0.0, 0.0 }; + uint32_t axes = device->scroll.direction; + + if (event.y == 0.0) + axes &= ~AS_MASK(LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL); + if (event.x == 0.0) + axes &= ~AS_MASK(LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL); + evdev_notify_axis(device, time, - device->scroll.direction, + axes, source, , _discrete); diff --git a/test/touchpad.c b/test/touchpad.c index e024ace..7bc99e9 100644 --- a/test/touchpad.c +++ b/test/touchpad.c @@ -144,6 +144,54 @@ START_TEST(touchpad_2fg_scroll) } END_TEST +START_TEST(touchpad_2fg_scroll_diagonal) +{ + struct litest_device *dev = litest_current_device(); + struct libinput *li = dev->libinput; + struct libinput_event *event; + struct libinput_event_pointer *ptrev; + int i; + + if (!litest_has_2fg_scroll(dev)) + return; + + litest_enable_2fg_scroll(dev); + litest_drain_events(li); + + litest_touch_down(dev, 0, 45, 30); + litest_touch_down(dev, 1, 55, 30); + + litest_touch_move_two_touches(dev, 45, 30, 55, 30, 10, 10, 10, 0); + libinput_dispatch(li); + litest_wait_for_event_of_type(li, + LIBINPUT_EVENT_POINTER_AXIS, + -1); + litest_drain_events(li); + + /* get rid of any touch history still adding x deltas sideways */ + for (i = 0; i < 5; i++) + litest_touch_move(dev, 0, 55, 41 + i); + litest_drain_events(li); + + for (i = 6; i < 10; i++) { + litest_touch_move(dev, 0, 55, 41 + i); + libinput_dispatch(li); + + event = libinput_get_event(li); + ptrev =
xserver-xorg-input-libinput: Changes to 'upstream-unstable'
Makefile.am |4 conf/90-libinput.conf | 28 ++ conf/99-libinput.conf |6 - configure.ac | 11 ++ include/libinput-properties.h | 12 ++ man/libinput.man |9 ++ src/xf86libinput.c| 185 +++--- 7 files changed, 234 insertions(+), 21 deletions(-) New commits: commit 44f4b2ed7075d424e3621f30815e11875b364c27 Author: Peter HuttererDate: Tue Oct 27 17:08:59 2015 +1000 xf86-input-libinput 0.15.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 61cad3a..268e030 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], -[0.14.0], +[0.15.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) commit 0163482e22ad65ec51e3636cf31f9f39e29ff709 Author: Peter Hutterer Date: Thu Sep 3 18:03:00 2015 +1000 Add property support for the accel profiles Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index f42fee3..61cad3a 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,7 @@ XORG_DEFAULT_OPTIONS # Obtain compiler/linker options from server and required extensions PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto [inputproto >= 2.2]) -PKG_CHECK_MODULES(LIBINPUT, [libinput >= 0.21.0]) +PKG_CHECK_MODULES(LIBINPUT, [libinput >= 1.0.901]) # Define a configure option for an alternate input module directory AC_ARG_WITH(xorg-module-dir, diff --git a/include/libinput-properties.h b/include/libinput-properties.h index 06fad7f..098ce48 100644 --- a/include/libinput-properties.h +++ b/include/libinput-properties.h @@ -48,6 +48,18 @@ /* Pointer accel speed: FLOAT, 1 value, 32 bit, read-only*/ #define LIBINPUT_PROP_ACCEL_DEFAULT "libinput Accel Speed Default" +/* Pointer accel profile: BOOL, 2 values in oder adaptive, flat, + * only one is enabled at a time at max, read-only */ +#define LIBINPUT_PROP_ACCEL_PROFILES_AVAILABLE "libinput Accel Profiles Available" + +/* Pointer accel profile: BOOL, 2 values in order adaptive, flat, + only one is enabled at a time at max, read-only */ +#define LIBINPUT_PROP_ACCEL_PROFILE_ENABLED_DEFAULT "libinput Accel Profile Enabled Default" + +/* Pointer accel profile: BOOL, 2 values in order adaptive, flat, + only one is enabled at a time at max */ +#define LIBINPUT_PROP_ACCEL_PROFILE_ENABLED "libinput Accel Profile Enabled" + /* Natural scrolling: BOOL, 1 value */ #define LIBINPUT_PROP_NATURAL_SCROLL "libinput Natural Scrolling Enabled" diff --git a/man/libinput.man b/man/libinput.man index 196686d..b6f476e 100644 --- a/man/libinput.man +++ b/man/libinput.man @@ -50,6 +50,15 @@ directives, this option is set by the server. The mapping from device node to hardware is system-dependent. Property: "Device Node" (read-only). .TP 7 +.BI "Option \*qAccelProfile\*q \*q" string \*q +Sets the pointer acceleration profile to the given profile. Permitted values +are +.BI adaptive, +.BI flat. +Not all devices support this option or all profiles. If a profile is +unsupported, the default profile for this is used. For a description on the +profiles and their behavior, see the libinput documentation. +.TP 7 .BI "Option \*qAccelSpeed\*q \*q" float \*q Sets the pointer acceleration speed within the range [-1, 1] .TP 7 diff --git a/src/xf86libinput.c b/src/xf86libinput.c index c1b13ff..3ca7514 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -110,6 +110,7 @@ struct xf86libinput { float matrix[9]; enum libinput_config_scroll_method scroll_method; enum libinput_config_click_method click_method; + enum libinput_config_accel_profile accel_profile; unsigned char btnmap[MAX_BUTTONS + 1]; @@ -193,6 +194,28 @@ LibinputApplyConfig(DeviceIntPtr dev) xf86IDrvMsg(pInfo, X_ERROR, "Failed to set speed %.2f\n", driver_data->options.speed); + + if (libinput_device_config_accel_get_profiles(device) && + driver_data->options.accel_profile != LIBINPUT_CONFIG_ACCEL_PROFILE_NONE && + libinput_device_config_accel_set_profile(device, + driver_data->options.accel_profile) != + LIBINPUT_CONFIG_STATUS_SUCCESS) { + const char *profile; + + switch (driver_data->options.accel_profile) { + case LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE: + profile = "adaptive"; + break; + case LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT: +
xserver-xorg-input-libinput: Changes to 'upstream-unstable'
.gitignore|8 Makefile.am |2 configure.ac |3 include/libinput-properties.h | 10 man/libinput.man | 58 src/Makefile.am |6 src/draglock.c| 282 src/draglock.h| 159 ++ src/libinput.c| 2616 --- src/xf86libinput.c| 2765 ++ test/.gitignore |1 test/Makefile.am | 13 test/test-draglock.c | 540 13 files changed, 3841 insertions(+), 2622 deletions(-) New commits: commit f48b64c8cd6f280ba8c589842ec2522a4bfe9b5c Author: Peter HuttererDate: Mon Aug 31 13:27:09 2015 +1000 xf86-input-libinput 0.14.0 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 26e0e70..bfb1d75 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], -[0.13.0], +[0.14.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) commit b55239ef2552c43efd4c4fb7d39e22c255dd4e6d Author: Yomi0 Date: Sun Aug 30 23:14:25 2015 -0400 Fix typo in libinput.man Correct typo. Draging to dragging. diff --git a/man/libinput.man b/man/libinput.man index 3c35776..196686d 100644 --- a/man/libinput.man +++ b/man/libinput.man @@ -123,7 +123,7 @@ Enables or disables tap-to-click behavior. .BI "Option \*qTappingDragLock\*q \*q" bool \*q Enables or disables drag lock during tapping behavior. When enabled, a finger up during tap-and-drag will not immediately release the button. If -the finger is set down again within the timeout, the draging process +the finger is set down again within the timeout, the dragging process continues. .TP 7 .BI "Option \*qDisableWhileTyping\*q \*q" bool \*q commit 9563334dda3c5563550fb2534b228c47216ec008 Author: Peter Hutterer Date: Thu Aug 13 11:03:44 2015 +1000 Use xf86OpenSerial instead of a direct open() call This will transparently handle server-side fds for us. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Martin Pieuchot diff --git a/src/xf86libinput.c b/src/xf86libinput.c index 204f288..7ecc0e6 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -923,7 +924,6 @@ open_restricted(const char *path, int flags, void *data) char *device = xf86CheckStrOption(pInfo->options, "Device", NULL); if (device != NULL && strcmp(path, device) == 0) { - fd = xf86CheckIntOption(pInfo->options, "fd", -1); free(device); break; } @@ -935,8 +935,7 @@ open_restricted(const char *path, int flags, void *data) return -ENODEV; } - if (fd == -1) - fd = open(path, flags); + fd = xf86OpenSerial(pInfo->options); return fd < 0 ? -errno : fd; } @@ -957,7 +956,7 @@ close_restricted(int fd, void *data) } if (!found) - close(fd); + xf86CloseSerial(fd); } const struct libinput_interface interface = { commit 353c52f2bec035f04c136c8f3b28571e2a4515df Author: Peter Hutterer Date: Thu Aug 13 10:59:39 2015 +1000 Revamp server fd opening The server already stores the server-fd in the options, so we only need to run through the list of current devices, find a match and extract that fd from the options. Less magic in our driver and it gives us a pInfo handle in open_restricted which we'll can use for xf86OpenSerial(). Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Martin Pieuchot diff --git a/src/xf86libinput.c b/src/xf86libinput.c index 8987518..204f288 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -118,80 +118,11 @@ struct xf86libinput { struct draglock draglock; }; -/* - libinput provides a userdata for the context, but not per path device. so - the open_restricted call has the libinput context, but no reference to - the pInfo->fd that we actually need to return. - To avoid this, we store each path/fd combination during pre_init in the - context, then return that during open_restricted. If a device is added - twice with two different fds this may give us the wrong fd but why are - you doing that anyway. - */ -struct serverfd { - struct xorg_list node; - int fd; -
libinput: Changes to 'upstream-unstable'
configure.ac | 27 doc/Makefile.am |6 doc/absolute-axes.dox|2 doc/dot/evemu.gv | 19 doc/faqs.dox |2 doc/gestures.dox |2 doc/normalization-of-relative-motion.dox |6 doc/page-hierarchy.dox |1 doc/palm-detection.dox |4 doc/pointer-acceleration.dox | 110 doc/reporting-bugs.dox |8 doc/seats.dox|4 doc/svg/ptraccel-linear.svg | 5486 +++ doc/svg/ptraccel-low-dpi.svg | 3748 + doc/svg/ptraccel-touchpad.svg| 1723 + doc/svg/ptraccel-trackpoint.svg | 3689 doc/tapping.dox |2 doc/tools.dox|4 doc/touchpads.dox|6 src/evdev-middle-button.c|4 src/evdev-mt-touchpad-edge-scroll.c | 23 src/evdev-mt-touchpad-gestures.c |3 src/evdev-mt-touchpad.c | 27 src/evdev-mt-touchpad.h |4 src/evdev.c | 71 src/evdev.h | 11 src/filter-private.h |8 src/filter.c | 591 ++- src/filter.h | 44 src/libinput-private.h | 14 src/libinput-util.h |6 src/libinput.c | 30 src/libinput.h | 12 test/device.c| 155 test/litest-int.h|4 test/litest.c| 21 test/touchpad.c | 111 tools/Makefile.am|2 tools/make-ptraccel-graphs.sh| 79 tools/ptraccel-debug.c | 48 tools/shared.c | 244 - udev/libinput-model-quirks.c |2 42 files changed, 15980 insertions(+), 383 deletions(-) New commits: commit a52cc616b4c00d0975a3311a2a06057bdb419ba2 Author: Peter HuttererDate: Thu Sep 3 16:34:35 2015 +1000 configure.ac: libinput 1.0.1 Signed-off-by: Peter Hutterer diff --git a/configure.ac b/configure.ac index 60664d1..4e0d9f6 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [1]) m4_define([libinput_minor_version], [0]) -m4_define([libinput_micro_version], [0]) +m4_define([libinput_micro_version], [1]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # b) If interfaces have been changed or added, but binary compatibility has #been preserved, change to C+1:0:A+1 # c) If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=15:2:5 +LIBINPUT_LT_VERSION=15:3:5 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) commit fc337c3895a1b107a219eb004993e6460bb74309 Author: Peter Hutterer Date: Mon Aug 31 14:05:11 2015 +1000 filter: fix constant acceleration for the X230 The x230 has a special acceleration method that relies on the touchpad magic slowdown. This was missing from commit c8da19b50a30d8, making two-finger scroll motions unusably fast https://bugs.freedesktop.org/show_bug.cgi?id=91819 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede (cherry picked from commit 6a0f9411f232148b297de40456dcbafc07067cd2) diff --git a/src/filter.c b/src/filter.c index 5df50d3..a646857 100644 --- a/src/filter.c +++ b/src/filter.c @@ -114,6 +114,8 @@ filter_get_speed(struct motion_filter *filter) #define X230_THRESHOLD v_ms2us(0.4)/* in units/us */ #define X230_ACCELERATION 2.0 /* unitless factor */ #define X230_INCLINE 1.1 /* unitless factor */ +#define X230_MAGIC_SLOWDOWN 0.4/* unitless */ +#define X230_TP_MAGIC_LOW_RES_FACTOR 4.0 /* unitless */ /* * Pointer acceleration filter constants @@ -421,6 +423,21 @@ accelerator_filter_x230(struct motion_filter *filter, } static struct normalized_coords +accelerator_filter_constant_x230(struct motion_filter *filter, +const struct normalized_coords *unaccelerated, +void *data, uint64_t time) +{ + struct normalized_coords normalized; + const double factor = + X230_MAGIC_SLOWDOWN/X230_TP_MAGIC_LOW_RES_FACTOR; + + normalized.x =
xserver-xorg-input-libinput: Changes to 'upstream-unstable'
configure.ac |4 include/libinput-properties.h | 12 ++ man/libinput.man | 23 src/libinput.c| 200 +- 4 files changed, 234 insertions(+), 5 deletions(-) New commits: commit 4b2bed6912d79f0104770d7956f14b4448c8b0ed Author: Peter Hutterer peter.hutte...@who-t.net Date: Tue Aug 4 17:08:22 2015 +1000 xf86-input-libinput 0.13.0 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net diff --git a/configure.ac b/configure.ac index 1ee6665..c149a1b 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], -[0.12.0], +[0.13.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) commit 223be9f62bc614c4bfa2836c5b0aaded70cadf9c Author: Stephen Chandler Paul cp...@redhat.com Date: Sun Aug 2 14:18:10 2015 -0400 Add a property for Disable While Typing Signed-off-by: Stephen Chandler Paul cp...@redhat.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net Signed-off-by: Peter Hutterer peter.hutte...@who-t.net diff --git a/configure.ac b/configure.ac index e7de887..1ee6665 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,7 @@ XORG_DEFAULT_OPTIONS # Obtain compiler/linker options from server and required extensions PKG_CHECK_MODULES(XORG, [xorg-server = 1.10] xproto [inputproto = 2.2]) -PKG_CHECK_MODULES(LIBINPUT, [libinput = 0.20.0]) +PKG_CHECK_MODULES(LIBINPUT, [libinput = 0.21.0]) # Define a configure option for an alternate input module directory AC_ARG_WITH(xorg-module-dir, diff --git a/include/libinput-properties.h b/include/libinput-properties.h index 6135dc8..f54cee7 100644 --- a/include/libinput-properties.h +++ b/include/libinput-properties.h @@ -108,4 +108,10 @@ /* Middle button emulation: BOOL, 1 value, read-only */ #define LIBINPUT_PROP_MIDDLE_EMULATION_ENABLED_DEFAULT libinput Middle Emulation Enabled Default +/* Disable while typing: BOOL, 1 value */ +#define LIBINPUT_PROP_DISABLE_WHILE_TYPING libinput Disable While Typing Enabled + +/* Disable while typing: BOOL, 1 value, read-only */ +#define LIBINPUT_PROP_DISABLE_WHILE_TYPING_DEFAULT libinput Disable While Typing Enabled Default + #endif /* _LIBINPUT_PROPERTIES_H_ */ diff --git a/man/libinput.man b/man/libinput.man index 0ce5e6d..ac546e6 100644 --- a/man/libinput.man +++ b/man/libinput.man @@ -119,6 +119,10 @@ Enables or disables drag lock during tapping behavior. When enabled, a finger up during tap-and-drag will not immediately release the button. If the finger is set down again within the timeout, the draging process continues. +.TP 7 +.BI Option \*qDisableWhileTyping\*q \*q bool \*q +Indicates if the touchpad should be disabled while typing on the keyboard +(this does not apply to modifier keys such as Ctrl or Alt). .PP For all options, the options are only parsed if the device supports that configuration option. For all options, the default value is the one used by @@ -187,6 +191,10 @@ Indicates which click methods are enabled on this device. .BI libinput Middle Emulation Enabled 1 boolean value (8 bit, 0 or 1). Indicates if middle emulation is enabled or disabled. +.TP 7 +.BI libinput Disable While Typing Enabled +1 boolean value (8 bit, 0 or 1). Indicates if disable while typing is +enabled or disabled. .TP7 .PP The above properties have a diff --git a/src/libinput.c b/src/libinput.c index c03777a..49f73c9 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -102,6 +102,7 @@ struct xf86libinput { BOOL natural_scrolling; BOOL left_handed; BOOL middle_emulation; + BOOL disable_while_typing; CARD32 sendevents; CARD32 scroll_button; /* xorg button number */ float speed; @@ -338,6 +339,13 @@ LibinputApplyConfig(DeviceIntPtr dev) xf86IDrvMsg(pInfo, X_ERROR, Failed to set MiddleEmulation to %d\n, driver_data-options.middle_emulation); + + if (libinput_device_config_dwt_is_available(device) + libinput_device_config_dwt_set_enabled(device, + driver_data-options.disable_while_typing) != LIBINPUT_CONFIG_STATUS_SUCCESS) + xf86IDrvMsg(pInfo, X_ERROR, + Failed to set DisableWhileTyping to %d\n, + driver_data-options.disable_while_typing); } static int @@ -1337,6 +1345,29 @@ xf86libinput_parse_middleemulation_option(InputInfoPtr pInfo, return enabled; } +static inline BOOL +xf86libinput_parse_disablewhiletyping_option(InputInfoPtr pInfo, +struct libinput_device *device) +{ + BOOL enabled; + + if
libinput: Changes to 'upstream-unstable'
Rebased ref, commits from common ancestor: -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1znagj-0002eb...@moszumanska.debian.org
xserver-xorg-input-libinput: Changes to 'upstream-unstable'
New branch 'upstream-unstable' available with the following commits: -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1yiucr-0001x8...@moszumanska.debian.org
libinput: Changes to 'upstream-unstable'
New branch 'upstream-unstable' available with the following commits: -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1yiz7h-0004xq...@moszumanska.debian.org