.gitignore | 30 Makefile.am | 13 autogen.sh | 13 circle.yml | 8 configure.ac | 282 - debian/changelog | 10 debian/control | 6 debian/libinput10.symbols | 2 debian/rules | 8 doc/Makefile.am | 116 doc/building.dox | 86 doc/button_debouncing.dox | 26 doc/device-configuration-via-udev.dox | 27 doc/dot/libinput-stack-gnome.gv | 2 doc/faqs.dox | 43 doc/libinput.doxygen.in | 18 doc/page-hierarchy.dox | 1 doc/palm-detection.dox | 34 doc/pointer-acceleration.dox | 16 doc/svg/palm-detection.svg | 47 doc/switches.dox | 16 doc/tablet-support.dox | 27 doc/test-suite.dox | 103 doc/touchpad-pressure.dox | 80 m4/.gitignore | 5 meson.build | 54 meson_options.txt | 10 src/Makefile.am | 81 src/evdev-fallback.c | 1777 ++++++++++ src/evdev-lid.c | 323 - src/evdev-middle-button.c | 14 src/evdev-mt-touchpad-buttons.c | 21 src/evdev-mt-touchpad-edge-scroll.c | 17 src/evdev-mt-touchpad-gestures.c | 7 src/evdev-mt-touchpad-tap.c | 7 src/evdev-mt-touchpad.c | 710 +++ src/evdev-mt-touchpad.h | 55 src/evdev-tablet-pad-leds.c | 9 src/evdev-tablet-pad.c | 23 src/evdev-tablet.c | 195 - src/evdev-tablet.h | 10 src/evdev.c | 1275 ------- src/evdev.h | 123 src/filter.c | 342 + src/filter.h | 9 src/libinput-private.h | 1 src/libinput-util.c | 58 src/libinput-util.h | 62 src/libinput.c | 70 src/libinput.h | 33 src/libinput.sym | 4 src/path-seat.c | 15 src/timer.c | 80 src/timer.h | 8 src/udev-seat.c | 9 test/Makefile.am | 184 - test/litest-device-acer-hawaii-keyboard.c | 12 test/litest-device-acer-hawaii-touchpad.c | 13 test/litest-device-alps-dualpoint.c | 13 test/litest-device-alps-semi-mt.c | 13 test/litest-device-anker-mouse-kbd.c | 12 test/litest-device-apple-appletouch.c | 13 test/litest-device-apple-internal-keyboard.c | 12 test/litest-device-apple-magicmouse.c | 12 test/litest-device-asus-rog-gladius.c | 12 test/litest-device-atmel-hover.c | 33 test/litest-device-bcm5974.c | 24 test/litest-device-calibrated-touchscreen.c | 13 test/litest-device-cyborg-rat-5.c | 12 test/litest-device-elantech-touchpad.c | 13 test/litest-device-generic-singletouch.c | 13 test/litest-device-gpio-keys.c | 13 test/litest-device-huion-pentablet.c | 27 test/litest-device-ignored-mouse.c | 65 test/litest-device-keyboard-all-codes.c | 21 test/litest-device-keyboard-razer-blackwidow.c | 12 test/litest-device-keyboard-razer-blade-stealth-videoswitch.c | 218 + test/litest-device-keyboard-razer-blade-stealth.c | 339 + test/litest-device-keyboard.c | 12 test/litest-device-lid-switch-surface3.c | 13 test/litest-device-lid-switch.c | 13 test/litest-device-logitech-trackball.c | 12 test/litest-device-magic-trackpad.c | 38 test/litest-device-mouse-low-dpi.c | 12 test/litest-device-mouse-roccat.c | 12 test/litest-device-mouse-wheel-click-angle.c | 12 test/litest-device-mouse-wheel-click-count.c | 12 test/litest-device-mouse-wheel-tilt.c | 12 test/litest-device-mouse.c | 12 test/litest-device-ms-surface-cover.c | 13 test/litest-device-nexus4-touch-screen.c | 13 test/litest-device-protocol-a-touch-screen.c | 13 test/litest-device-qemu-usb-tablet.c | 13 test/litest-device-synaptics-hover.c | 13 test/litest-device-synaptics-i2c.c | 13 test/litest-device-synaptics-rmi4.c | 13 test/litest-device-synaptics-st.c | 13 test/litest-device-synaptics-t440.c | 13 test/litest-device-synaptics-x1-carbon-3rd.c | 13 test/litest-device-synaptics.c | 13 test/litest-device-thinkpad-extrabuttons.c | 82 test/litest-device-touch-screen.c | 13 test/litest-device-touchscreen-fuzz.c | 13 test/litest-device-trackpoint.c | 12 test/litest-device-uclogic-tablet.c | 98 test/litest-device-vmware-virtual-usb-mouse.c | 13 test/litest-device-wacom-bamboo-16fg-pen.c | 12 test/litest-device-wacom-bamboo-2fg-finger.c | 98 test/litest-device-wacom-bamboo-2fg-pad.c | 84 test/litest-device-wacom-bamboo-2fg-pen.c | 120 test/litest-device-wacom-cintiq-12wx-pen.c | 12 test/litest-device-wacom-cintiq-13hdt-finger.c | 12 test/litest-device-wacom-cintiq-13hdt-pad.c | 14 test/litest-device-wacom-cintiq-13hdt-pen.c | 12 test/litest-device-wacom-cintiq-24hd-pen.c | 12 test/litest-device-wacom-cintiq-24hdt-pad.c | 15 test/litest-device-wacom-ekr.c | 13 test/litest-device-wacom-hid4800-pen.c | 12 test/litest-device-wacom-intuos3-pad.c | 13 test/litest-device-wacom-intuos5-finger.c | 13 test/litest-device-wacom-intuos5-pad.c | 13 test/litest-device-wacom-intuos5-pen.c | 12 test/litest-device-wacom-isdv4-e6-finger.c | 13 test/litest-device-wacom-isdv4-e6-pen.c | 12 test/litest-device-wacom-mobilestudio-pro-pad.c | 13 test/litest-device-waltop-tablet.c | 12 test/litest-device-wheel-only.c | 12 test/litest-device-xen-virtual-pointer.c | 13 test/litest-device-yubikey.c | 12 test/litest.c | 412 +- test/litest.h | 102 test/test-device.c | 20 test/test-gestures.c | 4 test/test-keyboard.c | 6 test/test-lid.c | 675 --- test/test-log.c | 27 test/test-misc.c | 233 + test/test-path.c | 30 test/test-pointer.c | 321 + test/test-switch.c | 1060 +++++ test/test-tablet.c | 233 + test/test-touch.c | 36 test/test-touchpad-buttons.c | 50 test/test-touchpad.c | 884 ++++ test/test-udev.c | 47 tools/.gitignore | 1 tools/Makefile.am | 79 tools/libinput-debug-events.c | 3 tools/libinput-debug-events.man | 6 tools/libinput-debug-gui.c | 6 tools/libinput-list-devices.c | 6 tools/libinput-measure-touch-size | 341 + tools/libinput-measure-touch-size.man | 57 tools/libinput-measure-touchpad-pressure | 295 + tools/libinput-measure-touchpad-pressure.man | 63 tools/libinput-measure-touchpad-tap.c | 8 tools/libinput-measure-trackpoint-range | 198 + tools/libinput-measure-trackpoint-range.man | 31 tools/libinput-measure.man | 9 tools/libinput.man | 9 tools/ptraccel-debug.c | 40 tools/shared.c | 39 tools/shared.h | 3 udev/.gitignore | 6 udev/90-libinput-model-quirks.hwdb | 29 udev/90-libinput-model-quirks.rules.in | 4 udev/Makefile.am | 51 udev/libinput-device-group.c | 95 udev/parse_hwdb.py | 100 169 files changed, 9436 insertions(+), 4791 deletions(-)
New commits: commit 8e52b31df6b85f482108f5bbbe334116bcc12d3d Author: Emilio Pozuelo Monfort <po...@debian.org> Date: Sat Nov 18 18:48:01 2017 +0100 Release to unstable diff --git a/debian/changelog b/debian/changelog index 5d91e55..9fe0c45 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -libinput (1.9.2-1) UNRELEASED; urgency=medium +libinput (1.9.2-1) unstable; urgency=medium * New upstream release. * Switch to meson. @@ -6,7 +6,7 @@ libinput (1.9.2-1) UNRELEASED; urgency=medium * Move libinput-{dev,tools} to priority optional. * Add python3 dependencies for new python scripts. - -- Emilio Pozuelo Monfort <po...@debian.org> Sat, 18 Nov 2017 17:39:46 +0100 + -- Emilio Pozuelo Monfort <po...@debian.org> Sat, 18 Nov 2017 18:47:56 +0100 libinput (1.8.3-1) unstable; urgency=medium commit ba40866b1f95178c0d3b2368fe134a2e6b0bbb3d Author: Emilio Pozuelo Monfort <po...@debian.org> Date: Sat Nov 18 18:27:56 2017 +0100 Add python3 dependencies for new python scripts diff --git a/debian/changelog b/debian/changelog index bf5effd..5d91e55 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ libinput (1.9.2-1) UNRELEASED; urgency=medium * Switch to meson. * Add new symbols. * Move libinput-{dev,tools} to priority optional. + * Add python3 dependencies for new python scripts. -- Emilio Pozuelo Monfort <po...@debian.org> Sat, 18 Nov 2017 17:39:46 +0100 diff --git a/debian/control b/debian/control index bf6110e..7db53e5 100644 --- a/debian/control +++ b/debian/control @@ -91,6 +91,9 @@ Depends: libinput10 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, + python3, + python3-evdev, + python3-pyudev, Description: input device management and event handling library - command line tools libinput is a library that handles input devices for display servers and other applications that need to directly deal with input devices. commit 67b6fd118a42cfc87ea5d8f03f6c5bb83e4ce6b3 Author: Emilio Pozuelo Monfort <po...@debian.org> Date: Sat Nov 18 18:23:39 2017 +0100 Move libinput-{dev,tools} to priority optional diff --git a/debian/changelog b/debian/changelog index 93e8788..bf5effd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ libinput (1.9.2-1) UNRELEASED; urgency=medium * New upstream release. * Switch to meson. * Add new symbols. + * Move libinput-{dev,tools} to priority optional. -- Emilio Pozuelo Monfort <po...@debian.org> Sat, 18 Nov 2017 17:39:46 +0100 diff --git a/debian/control b/debian/control index 0f5a8f3..bf6110e 100644 --- a/debian/control +++ b/debian/control @@ -65,7 +65,6 @@ Description: input device management and event handling library - shared library Package: libinput-dev Section: libdevel -Priority: extra Architecture: any Multi-Arch: same Depends: @@ -86,7 +85,6 @@ Description: input device management and event handling library - development fi Package: libinput-tools Section: libdevel -Priority: extra Architecture: any Multi-Arch: allowed Depends: commit 44e42fb81c14afec14ad7c595894c3aa38755351 Author: Emilio Pozuelo Monfort <po...@debian.org> Date: Sat Nov 18 18:20:59 2017 +0100 Add new symbols diff --git a/debian/changelog b/debian/changelog index d1c783a..93e8788 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ libinput (1.9.2-1) UNRELEASED; urgency=medium * New upstream release. * Switch to meson. + * Add new symbols. -- Emilio Pozuelo Monfort <po...@debian.org> Sat, 18 Nov 2017 17:39:46 +0100 diff --git a/debian/libinput10.symbols b/debian/libinput10.symbols index edff3cb..2eba642 100644 --- a/debian/libinput10.symbols +++ b/debian/libinput10.symbols @@ -12,6 +12,7 @@ libinput.so.10 libinput10 #MINVER# LIBINPUT_1.4@LIBINPUT_1.4 1.4.0 LIBINPUT_1.5@LIBINPUT_1.5 1.5.0 LIBINPUT_1.7@LIBINPUT_1.7 1.7.2 + LIBINPUT_1.9@LIBINPUT_1.9 1.9.2 libinput_config_status_to_str@LIBINPUT_0.12.0 0.15.0 libinput_device_config_accel_get_default_profile@LIBINPUT_1.1 1.1.0 libinput_device_config_accel_get_default_speed@LIBINPUT_0.12.0 0.15.0 @@ -95,6 +96,7 @@ libinput.so.10 libinput10 #MINVER# libinput_device_ref@LIBINPUT_0.12.0 0.15.0 libinput_device_set_seat_logical_name@LIBINPUT_0.12.0 0.15.0 libinput_device_set_user_data@LIBINPUT_0.12.0 0.15.0 + libinput_device_switch_has_switch@LIBINPUT_1.9 1.9.2 libinput_device_tablet_pad_get_mode_group@LIBINPUT_1.4 1.4.0 libinput_device_tablet_pad_get_num_buttons@LIBINPUT_1.3 1.3.0 libinput_device_tablet_pad_get_num_mode_groups@LIBINPUT_1.4 1.4.0 commit 03acfe590106578f228cdbbbb300c7555ed3eb43 Author: Emilio Pozuelo Monfort <po...@debian.org> Date: Sat Nov 18 17:47:17 2017 +0100 Switch to meson diff --git a/debian/changelog b/debian/changelog index 3454c3b..d1c783a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ libinput (1.9.2-1) UNRELEASED; urgency=medium * New upstream release. + * Switch to meson. -- Emilio Pozuelo Monfort <po...@debian.org> Sat, 18 Nov 2017 17:39:46 +0100 diff --git a/debian/control b/debian/control index dfbdbb8..0f5a8f3 100644 --- a/debian/control +++ b/debian/control @@ -5,6 +5,7 @@ Maintainer: Debian X Strike Force <debian-x@lists.debian.org> Uploaders: Emilio Pozuelo Monfort <po...@debian.org>, Héctor Orón Martínez <zu...@debian.org> Build-Depends: debhelper (>= 10), + meson, pkg-config, libmtdev-dev (>= 1.1.0), libudev-dev, diff --git a/debian/rules b/debian/rules index 8dc1ce6..00ab3e2 100755 --- a/debian/rules +++ b/debian/rules @@ -2,10 +2,10 @@ override_dh_auto_configure: dh_auto_configure -- \ - --enable-debug-gui=no \ - --enable-documentation=no \ - --enable-tests=no \ - --with-udev-dir=/lib/udev + -Ddebug-gui=false \ + -Ddocumentation=false \ + -Dtests=false \ + -Dudev-dir=/lib/udev override_dh_install: find debian/tmp -name '*.la' -delete commit 8fb9fdbd7b5632b578d37478304c7ffbb26b4abb Author: Emilio Pozuelo Monfort <po...@debian.org> Date: Sat Nov 18 17:39:46 2017 +0100 New upstream release diff --git a/debian/changelog b/debian/changelog index dd460cc..3454c3b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libinput (1.9.2-1) UNRELEASED; urgency=medium + + * New upstream release. + + -- Emilio Pozuelo Monfort <po...@debian.org> Sat, 18 Nov 2017 17:39:46 +0100 + libinput (1.8.3-1) unstable; urgency=medium * New upstream release. commit 56bcb2999e92b0814768cdcf075dd87a5b09e446 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Wed Nov 15 14:17:51 2017 +1000 libinput 1.9.2 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> 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 <peter.hutte...@who-t.net> Date: Wed Nov 15 13:32:30 2017 +1000 man: add --enable-middlebutton to debug-events man page Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> (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 <peter.hutte...@who-t.net> 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 <peter.hutte...@who-t.net> (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 <peter.hutte...@who-t.net> 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 <peter.hutte...@who-t.net> (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, + "Failed to execute '%s' (%s)\n", + command, + strerror(errno)); + } + } return EXIT_FAILURE; } commit 73c9ed2cd921e2aea8a33cde82e84ff97bae1559 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Thu Nov 9 13:51:35 2017 +1000 tools: fix missing words in man page Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> (cherry picked from commit be344a3afbfb4a812b7c302e32c8373da9240c80) diff --git a/tools/libinput-measure-touch-size.man b/tools/libinput-measure-touch-size.man index f33f13c..5525ec5 100644 --- a/tools/libinput-measure-touch-size.man +++ b/tools/libinput-measure-touch-size.man @@ -9,7 +9,7 @@ libinput\-measure\-touch-size \- measure touch size and orientation of devices The .B "libinput measure touch\-size" tool measures the size and orientation of a touch as provided by the kernel. -an interactive tool. When executed, the tool will prompt the user to +This is an interactive tool. When executed, the tool will prompt the user to interact with the touch device. On termination, the tool prints a summary of the values seen. This data should be attached to any touch\-size\-related bug report. commit ed17f8b6371498dba76590eb09c2c29fac28277f Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Wed Nov 8 21:38:13 2017 +1000 doc: add a FAQ regarding "please add a configuration option" Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> (cherry picked from commit c67b74b45ec2e0e450dd25d39554018b539bfd33) diff --git a/doc/faqs.dox b/doc/faqs.dox index 3ef4c59..1d5ff3b 100644 --- a/doc/faqs.dox +++ b/doc/faqs.dox @@ -125,6 +125,20 @@ 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_configuration Can you add a configuration option for $FEATURE? + +No. At least that's going to be the initial answer. Read <a +href="http://who-t.blogspot.com/2016/04/why-libinput-doesnt-have-lot-of-config.html">Why +libinput doesn't have a lot of configuration options</a> first. +Configuration options for most features are a signal that we are incapable +of handling it correctly. To get to that point, we want to be sure we're +truly incapable of doing so. libinput has several features that +are handled automatically (and correctly) that users wanted to have +configuration options for initially. + +So the answer to this question will almost always be 'no'. A configuration +option is, in most cases, a cop-out. + @section faq_synclient Why don't synclient and syndaemon work with libinput? Synclient and syndaemon rely on X input device properties that are specific commit 15e40a42e743356363722923737e9a1a0fffde19 Author: Stefan Brüns <stefan.bru...@rwth-aachen.de> Date: Fri Nov 3 23:01:23 2017 +0100 tools: Handle LIBINPUT_SWITCH_TABLET_MODE Signed-off-by: Stefan Brüns <stefan.bru...@rwth-aachen.de> Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> (cherry picked from commit 48fd22def7ae1a8d67d1f6f2e0d6e6f98c7a9361) diff --git a/tools/libinput-debug-events.c b/tools/libinput-debug-events.c index 87b7b80..fb8d84d 100644 --- a/tools/libinput-debug-events.c +++ b/tools/libinput-debug-events.c @@ -747,6 +747,9 @@ print_switch_event(struct libinput_event *ev) case LIBINPUT_SWITCH_LID: which = "lid"; break; + case LIBINPUT_SWITCH_TABLET_MODE: + which = "tablet-mode"; + break; default: abort(); } commit 5c989940b6b3900d33e61bbddeac71f1fae9d7be Author: Stefan Brüns <stefan.bru...@rwth-aachen.de> Date: Fri Nov 3 23:22:15 2017 +0100 tools: Show gesture/switch capabilities in list-devices output Signed-off-by: Stefan Brüns <stefan.bru...@rwth-aachen.de> Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> (cherry picked from commit 5ea84fa7dad6e2f17f109f664d80a4d7956d5f9a) diff --git a/tools/libinput-list-devices.c b/tools/libinput-list-devices.c index 376a3c9..aa225ca 100644 --- a/tools/libinput-list-devices.c +++ b/tools/libinput-list-devices.c @@ -314,6 +314,12 @@ print_device_notify(struct libinput_event *ev) if (libinput_device_has_capability(dev, LIBINPUT_DEVICE_CAP_TABLET_PAD)) printf("tablet-pad"); + if (libinput_device_has_capability(dev, + LIBINPUT_DEVICE_CAP_GESTURE)) + printf("gesture"); + if (libinput_device_has_capability(dev, + LIBINPUT_DEVICE_CAP_SWITCH)) + printf("switch"); printf("\n"); printf("Tap-to-click: %s\n", tap_default(dev)); commit edd83fe99e34c9bb6270687dcb5ef8b650b19085 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Wed Nov 1 14:12:01 2017 +1000 test: mkdir -p the udev rules and hwdb directories Especially /run/udev/rules.d may not exist, causing a test suite failure. https://bugs.freedesktop.org/show_bug.cgi?id=103527 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> (cherry picked from commit d332a64df8d6d91328012ebd4ae2dc664b087c23) diff --git a/test/litest.c b/test/litest.c index d34bd3c..ebb1867 100644 --- a/test/litest.c +++ b/test/litest.c @@ -27,6 +27,7 @@ #include <check.h> #include <dirent.h> #include <errno.h> +#include <libgen.h> #include <fcntl.h> #include <fnmatch.h> #include <getopt.h> @@ -1071,20 +1072,35 @@ litest_install_model_quirks(struct list *created_files_list) list_insert(created_files_list, &file->link); } -static void -litest_init_udev_rules(struct list *created_files) +static inline void +mkdir_p(const char *dir) { + char *path, *parent; int rc; - rc = mkdir(UDEV_RULES_D, 0755); - if (rc == -1 && errno != EEXIST) - litest_abort_msg("Failed to create udev rules directory (%s)\n", - strerror(errno)); + if (streq(dir, "/")) + return; + + path = strdup(dir); + parent = dirname(path); + + mkdir_p(parent); + rc = mkdir(dir, 0755); - rc = mkdir(UDEV_HWDB_D, 0755); - if (rc == -1 && errno != EEXIST) - litest_abort_msg("Failed to create udev hwdb directory (%s)\n", + if (rc == -1 && errno != EEXIST) { + litest_abort_msg("Failed to create directory %s (%s)\n", + dir, strerror(errno)); + } + + free(path); +} + +static void +litest_init_udev_rules(struct list *created_files) +{ + mkdir_p(UDEV_RULES_D); + mkdir_p(UDEV_HWDB_D); litest_install_model_quirks(created_files); litest_init_all_device_udev_rules(created_files); commit e7be909838a4d04863b6d0fb3e9104e2240a145f Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Thu Nov 2 10:23:50 2017 +1000 doc: update test suite page for ninja and other recent changes Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> (cherry picked from commit b15b66616e474f7587700a7fb7d7a757f0d31864) diff --git a/doc/test-suite.dox b/doc/test-suite.dox index e6fbe62..d939689 100644 --- a/doc/test-suite.dox +++ b/doc/test-suite.dox @@ -1,18 +1,21 @@ /** @page test-suite libinput test suite -The libinput test suite is based on -[Check](http://check.sourceforge.net/doc/check_html/) and runs automatically -during `make check`. Check itself is wrapped into a libinput-specific test -suite called *litest*. Tests are found in `$srcdir/test/`, the main test -suite is `libinput-test-suite-runner`. - -The test suite has a make-like job control enabled by the `-j` or `--jobs` -flag and will fork off as many parallel processes as given by this flag. The -default if unspecified is 8. When debugging a specific test case failure it -is recommended to employ test filtures (see @ref test-filtering) and disable -parallel tests. The test suite automatically disables parallel make when run -in gdb. +libinput ships with a number of tests all run automatically on `ninja test`. +The primary test suite is the `libinput-test-suite-runner`. When testing, +the `libinput-test-suite-runner` should always be invoked to check for +behavior changes. + +The test suite runner uses +[Check](http://check.sourceforge.net/doc/check_html/) underneath the hood +but most of the functionality is abstracted into *litest* wrappers. + +The test suite runner has a make-like job control enabled by the `-j` or +`--jobs` flag and will fork off as many parallel processes as given by this +flag. The default if unspecified is 8. When debugging a specific test case +failure it is recommended to employ test filtures (see @ref test-filtering) +and disable parallel tests. The test suite automatically disables parallel +make when run in gdb. @section test-config X.Org config to avoid interference @@ -28,35 +31,67 @@ with your desktop. Most tests require the creation of uinput devices and access to the resulting `/dev/input/eventX` nodes. Some tests require temporary udev rules. -<b>This usually requires the tests to be run as root</b>. +<b>This usually requires the tests to be run as root</b>. If not run as +root, the test suite runner will exit with status 77, interpreted as +"skipped" by ninja. @section test-filtering Selective running of tests -litest's tests are grouped by test groups and devices. A test group is e.g. -"touchpad:tap" and incorporates all tapping-related tests for touchpads. -Each test function is (usually) run with one or more specific devices. -The `--list` commandline argument shows the list of suites and tests. +litest's tests are grouped into test groups, test names and devices. A test +group is e.g. "touchpad:tap" and incorporates all tapping-related tests for +touchpads. Each test function is (usually) run with one or more specific +devices. The `--list` commandline argument shows the list of suites and +tests. This is useful when trying to figure out if a specific test is +run for a device. + @code $ ./test/libinput-test-suite-runner --list -device:wheel: - wheel only - blackwidow -device:invalid devices: - no device -device:group: - no device - logitech trackball - MS surface cover - mouse_roccat - wheel only - blackwidow +... +pointer:left-handed: + pointer_left_handed_during_click_multiple_buttons: + trackpoint + ms-surface-cover + mouse-wheelclickcount + mouse-wheelclickangle + low-dpi-mouse + mouse-roccat + mouse-wheel-tilt + mouse + logitech-trackball + cyborg-rat + magicmouse + pointer_left_handed_during_click: + trackpoint + ms-surface-cover + mouse-wheelclickcount + mouse-wheelclickangle + low-dpi-mouse + mouse-roccat + mouse-wheel-tilt + mouse + logitech-trackball + cyborg-rat + litest-magicmouse-device + pointer_left_handed: + trackpoint + ms-surface-cover + mouse-wheelclickcount + mouse-wheelclickangle + low-dpi-mouse + mouse-roccat + mouse-wheel-tilt + mouse ... @endcode -In the above example, the "device:wheel" suite is run for the "wheel only" and -the "blackwidow" device. Both devices are automatically instantiated through -uinput by litest. The "no device" entry signals that litest does not -instantiate a uinput device for a specific test (though the test itself may +In the above example, the "pointer:left-handed" suite contains multiple +tests, e.g. "pointer_left_handed_during_click" (this is also the function +name of the test, making it easy to grep for). This particular test is run +for various devices including the trackpoint device and the magic mouse +device. + +The "no device" entry signals that litest does not instantiate a uinput +device for a specific test (though the test itself may instantiate one). The `--filter-test` argument enables selective running of tests through @@ -93,7 +128,7 @@ environment variable, if set, also enables verbose mode. @code $ ./test/libinput-test-suite-runner --verbose -$ LITEST_VERBOSE=1 make check +$ LITEST_VERBOSE=1 ninja test @endcode */ commit 03cd377e00f9eacf3716c9b901ccf1295ba721de Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Thu Nov 2 10:21:46 2017 +1000 test: fix the device name for the magic mouse test device Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> (cherry picked from commit 04c6439449a81310c436be6ef85ad5edef1c4d59) diff --git a/test/litest-device-apple-magicmouse.c b/test/litest-device-apple-magicmouse.c index f657415..10852e9 100644 --- a/test/litest-device-apple-magicmouse.c +++ b/test/litest-device-apple-magicmouse.c @@ -100,7 +100,7 @@ static const char udev_rule[] = "\n" "LABEL=\"mouse_end\""; -TEST_DEVICE("litest-magicmouse-device", +TEST_DEVICE("magicmouse", .type = LITEST_MAGICMOUSE, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, .interface = &interface, commit 89660005a8b58051c1422e553426f6e4f891fed4 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Wed Nov 1 14:54:59 2017 +1000 doc: quote all paths in the doxygen file https://bugs.freedesktop.org/show_bug.cgi?id=103532 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> (cherry picked from commit fb467dce8fd3271697b5cc1aec6fdf6a12b865cc) diff --git a/doc/libinput.doxygen.in b/doc/libinput.doxygen.in index e3c3d34..7d6ce9c 100644 --- a/doc/libinput.doxygen.in +++ b/doc/libinput.doxygen.in @@ -9,8 +9,8 @@ EXTRACT_STATIC = YES MAX_INITIALIZER_LINES = 0 QUIET = YES INPUT = @INPUT@ -IMAGE_PATH = @top_srcdir@/doc/svg \ - @top_srcdir@/doc/dot +IMAGE_PATH = "@top_srcdir@/doc/svg" \ + "@top_srcdir@/doc/dot" GENERATE_HTML = YES SEARCHENGINE = NO USE_MATHJAX = YES @@ -20,11 +20,11 @@ MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES PREDEFINED = LIBINPUT_ATTRIBUTE_PRINTF(f, a)= \ LIBINPUT_ATTRIBUTE_DEPRECATED -DOTFILE_DIRS = @top_srcdir@/doc/dot +DOTFILE_DIRS = "@top_srcdir@/doc/dot" -HTML_HEADER = @top_srcdir@/doc/style/header.html -HTML_FOOTER = @top_srcdir@/doc/style/footer.html -HTML_EXTRA_STYLESHEET = @top_srcdir@/doc/style/bootstrap.css \ - @top_srcdir@/doc/style/customdoxygen.css \ - @top_srcdir@/doc/style/libinputdoxygen.css -USE_MDFILE_AS_MAINPAGE = @top_srcdir@/README.md +HTML_HEADER = "@top_srcdir@/doc/style/header.html" +HTML_FOOTER = "@top_srcdir@/doc/style/footer.html" +HTML_EXTRA_STYLESHEET = "@top_srcdir@/doc/style/bootstrap.css" \ + "@top_srcdir@/doc/style/customdoxygen.css" \ + "@top_srcdir@/doc/style/libinputdoxygen.css" +USE_MDFILE_AS_MAINPAGE = "@top_srcdir@/README.md" commit 5b862de70d0017f5c513af06a1ef014aff56de5e Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Wed Nov 1 11:19:08 2017 +1000 circle.yml: add ninja dist to tests Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> (cherry picked from commit e182489ce7fe9b543db05cab49c298173013c580) diff --git a/circle.yml b/circle.yml index 7ecbaf6..a55578e 100644 --- a/circle.yml +++ b/circle.yml @@ -41,6 +41,12 @@ libinput_jobs: name: Build - No docs environment: MESON_PARAMS: -Ddocumentation=false + build_dist: &build_dist + run: + <<: *build_and_test_default + name: Build - ninja dist + environment: + NINJA_ARGS: dist ninja_scan_build: &ninja_scan_build run: <<: *build_and_test_default @@ -88,6 +94,7 @@ fedora_build_all: &fedora_build_all - *build_no_debug_gui - *build_no_tests - *build_no_docs + - *build_dist ubuntu_install: &ubuntu_install run: @@ -112,6 +119,7 @@ ubuntu_build_all: &ubuntu_build_all - *build_no_debug_gui - *build_no_tests - *build_no_docs + - *build_dist scan_build_run: &scan_build_run <<: *default_settings commit a83085e4f98d783c2f96593989ca36788ef3d332 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Mon Oct 23 14:34:47 2017 +1000 touchpad: allow for multiple paired keyboards needed for the razer blade keybard which provides multiple event nodes for one physical device but it's hard/impossible to identify which one is the real event node we care about. https://bugs.freedesktop.org/show_bug.cgi?id=103156 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> (cherry picked from commit 4d7592066a120b00386283ebcbb7503296720626)