Hello community, here is the log from the commit of package libinput for openSUSE:Factory checked in at 2017-11-14 14:17:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libinput (Old) and /work/SRC/openSUSE:Factory/.libinput.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libinput" Tue Nov 14 14:17:21 2017 rev:51 rq:540335 version:1.9.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libinput/libinput.changes 2017-10-26 18:43:18.918943999 +0200 +++ /work/SRC/openSUSE:Factory/.libinput.new/libinput.changes 2017-11-14 14:17:31.646951117 +0100 @@ -1,0 +2,12 @@ +Thu Nov 9 19:40:43 UTC 2017 - aavind...@gmail.com + +- Update to version 1.9.1: + + Stop a crash when a lid was opened/closed multiple times while + typing. + + Reduction of the palm edge zone to a maximum width of 8mm (this + notably helps users of recent macs that have large touchpads) + + Benjamin's fix to the device groups enables touch arbitration + on the Dell Canvas 27 (still needs libwacom changes) +- Remove name specification from %setup, not needed + +------------------------------------------------------------------- Old: ---- libinput-1.9.0.tar.xz libinput-1.9.0.tar.xz.sig New: ---- libinput-1.9.1.tar.xz libinput-1.9.1.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libinput.spec ++++++ --- /var/tmp/diff_new_pack.yTk6j7/_old 2017-11-14 14:17:32.486920476 +0100 +++ /var/tmp/diff_new_pack.yTk6j7/_new 2017-11-14 14:17:32.490920330 +0100 @@ -18,7 +18,7 @@ Name: libinput %define lname libinput10 -Version: 1.9.0 +Version: 1.9.1 Release: 0 Summary: Input device and event processing library License: MIT @@ -97,7 +97,7 @@ to develop applications that require libinput. %prep -%setup -qn %name-%version +%setup -q %build %meson \ ++++++ libinput-1.9.0.tar.xz -> libinput-1.9.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.9.0/doc/faqs.dox new/libinput-1.9.1/doc/faqs.dox --- old/libinput-1.9.0/doc/faqs.dox 2017-10-19 05:59:03.000000000 +0200 +++ new/libinput-1.9.1/doc/faqs.dox 2017-10-30 06:16:22.000000000 +0100 @@ -155,6 +155,22 @@ you have a tablet that does not work with libinput, please @ref reporting_bugs "file a bug". +@section faq_tablet_capabilities My tablet doesn't work + +If you see the message +<pre> +libinput bug: device does not meet tablet criteria. Ignoring this device. +</pre> + +or the message +<pre> +missing tablet capabilities [...] Ignoring this device. +</pre> + +your tablet device does not have the required capabilities to be treated as +a tablet. This is usually a problem with the device and the kernel driver. +See @ref tablet-capabilities for more details. + @section faq_hwdb_changes How to apply hwdb changes Sometimes users are asked to test updates to the <a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.9.0/doc/tablet-support.dox new/libinput-1.9.1/doc/tablet-support.dox --- old/libinput-1.9.0/doc/tablet-support.dox 2017-10-19 05:59:03.000000000 +0200 +++ new/libinput-1.9.1/doc/tablet-support.dox 2017-10-30 06:16:22.000000000 +0100 @@ -344,4 +344,31 @@ and automatically discards touch events whenever a tool is in proximity. The exact behavior is device-dependent. +@section tablet-capabilities Required tablet capabilities + +To handle a tablet correctly, libinput requires a set of capabilities +on the device. When these capabilities are missing, libinput ignores the +device and prints an error to the log. This error messages reads +<pre> +missing tablet capabilities: xy pen btn-stylus resolution. Ignoring this device. +</pre> +or in older versions of libinput simply: +<pre> +libinput bug: device does not meet tablet criteria. Ignoring this device. +</pre> + +When a tablet is rejected, it is usually possible to check the issue with +the `evemu-descibe` tool. + +- **xy** indicates that the tablet is missing the `ABS_X` and/or `ABS_Y` + axis. This indicates that the device is mislabelled and the udev tag + `ID_INPUT_TABLET` is applied to a device that is not a tablet. +- **pen** or **btn-stylus** indicates that the tablet does not have the + `BTN_TOOL_PEN` or `BTN_STYLUS` bit set. libinput requires either or both + of them to be present. This usually indicates a bug in the kernel driver + or the HID descriptors of the device. +- **resolution** indicates that the device does not have a resolution set + for the x and y axes. This can be fixed with a hwdb entry, locate and read + the 60-evdev.hwdb file on your machine to address this. + */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.9.0/meson.build new/libinput-1.9.1/meson.build --- old/libinput-1.9.0/meson.build 2017-10-19 05:59:03.000000000 +0200 +++ new/libinput-1.9.1/meson.build 2017-10-30 06:16:22.000000000 +0100 @@ -1,5 +1,5 @@ project('libinput', 'c', 'cpp', - version : '1.9.0', + version : '1.9.1', license : 'MIT/Expat', default_options : [ 'c_std=gnu99', 'warning_level=2' ], meson_version : '>= 0.40.0') @@ -456,7 +456,7 @@ ) if get_option('debug-gui') - dep_gtk = dependency('gtk+-3.0') + dep_gtk = dependency('gtk+-3.0', version : '>= 3.20') dep_cairo = dependency('cairo') dep_glib = dependency('glib-2.0') @@ -573,6 +573,9 @@ 'test/litest-device-touch-screen.c', 'test/litest-device-touchscreen-fuzz.c', 'test/litest-device-uclogic-tablet.c', + 'test/litest-device-wacom-bamboo-2fg-finger.c', + 'test/litest-device-wacom-bamboo-2fg-pad.c', + 'test/litest-device-wacom-bamboo-2fg-pen.c', 'test/litest-device-wacom-bamboo-16fg-pen.c', 'test/litest-device-wacom-cintiq-12wx-pen.c', 'test/litest-device-wacom-cintiq-13hdt-finger.c', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.9.0/src/evdev-fallback.c new/libinput-1.9.1/src/evdev-fallback.c --- old/libinput-1.9.0/src/evdev-fallback.c 2017-10-19 05:59:03.000000000 +0200 +++ new/libinput-1.9.1/src/evdev-fallback.c 2017-10-30 06:16:22.000000000 +0100 @@ -949,6 +949,8 @@ { assert(kbd->device); + libinput_device_remove_event_listener(&kbd->listener); + if (is_closed) { libinput_device_add_event_listener( &kbd->device->base, @@ -956,10 +958,7 @@ fallback_lid_keyboard_event, dispatch); } else { - libinput_device_remove_event_listener( - &kbd->listener); - libinput_device_init_event_listener( - &kbd->listener); + libinput_device_init_event_listener(&kbd->listener); } } @@ -992,11 +991,11 @@ case SW_LID: is_closed = !!e->value; + fallback_lid_toggle_keyboard_listeners(dispatch, is_closed); + if (dispatch->lid.is_closed == is_closed) return; - fallback_lid_toggle_keyboard_listeners(dispatch, is_closed); - dispatch->lid.is_closed = is_closed; fallback_lid_notify_toggle(dispatch, device, time); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.9.0/src/evdev-mt-touchpad.c new/libinput-1.9.1/src/evdev-mt-touchpad.c --- old/libinput-1.9.0/src/evdev-mt-touchpad.c 2017-10-19 05:59:03.000000000 +0200 +++ new/libinput-1.9.1/src/evdev-mt-touchpad.c 2017-10-30 06:16:22.000000000 +0100 @@ -2647,11 +2647,11 @@ return; /* palm edges are 8% of the width on each side */ - mm.x = width * 0.08; + mm.x = min(8, width * 0.08); edges = evdev_device_mm_to_units(device, &mm); tp->palm.left_edge = edges.x; - mm.x = width * 0.92; + mm.x = width - min(8, width * 0.08); edges = evdev_device_mm_to_units(device, &mm); tp->palm.right_edge = edges.x; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.9.0/src/evdev-tablet.c new/libinput-1.9.1/src/evdev-tablet.c --- old/libinput-1.9.0/src/evdev-tablet.c 2017-10-19 05:59:03.000000000 +0200 +++ new/libinput-1.9.1/src/evdev-tablet.c 2017-10-30 06:16:22.000000000 +0100 @@ -1980,29 +1980,26 @@ tablet_reject_device(struct evdev_device *device) { struct libevdev *evdev = device->evdev; - int rc = -1; double w, h; + bool has_xy, has_pen, has_btn_stylus, has_size; - if (!libevdev_has_event_code(evdev, EV_ABS, ABS_X) || - !libevdev_has_event_code(evdev, EV_ABS, ABS_Y)) - goto out; - - if (!libevdev_has_event_code(evdev, EV_KEY, BTN_TOOL_PEN) && - !libevdev_has_event_code(evdev, EV_KEY, BTN_STYLUS)) - goto out; - - if (evdev_device_get_size(device, &w, &h) != 0) - goto out; - - rc = 0; - -out: - if (rc) { - evdev_log_bug_libinput(device, - "device does not meet tablet criteria. " - "Ignoring this device.\n"); - } - return rc; + has_xy = libevdev_has_event_code(evdev, EV_ABS, ABS_X) && + libevdev_has_event_code(evdev, EV_ABS, ABS_Y); + has_pen = libevdev_has_event_code(evdev, EV_KEY, BTN_TOOL_PEN); + has_btn_stylus = libevdev_has_event_code(evdev, EV_KEY, BTN_STYLUS); + has_size = evdev_device_get_size(device, &w, &h) == 0; + + if (has_xy && (has_pen || has_btn_stylus) && has_size) + return 0; + + evdev_log_bug_libinput(device, + "missing tablet capabilities:%s%s%s%s." + "Ignoring this device.\n", + has_xy ? "" : " xy", + has_pen ? "" : " pen", + has_btn_stylus ? "" : " btn-stylus", + has_size ? "" : " resolution"); + return -1; } static int diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.9.0/test/litest-device-wacom-bamboo-2fg-finger.c new/libinput-1.9.1/test/litest-device-wacom-bamboo-2fg-finger.c --- old/libinput-1.9.0/test/litest-device-wacom-bamboo-2fg-finger.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libinput-1.9.1/test/litest-device-wacom-bamboo-2fg-finger.c 2017-10-30 06:16:22.000000000 +0100 @@ -0,0 +1,98 @@ +/* + * Copyright © 2017 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include "config.h" + +#include "litest.h" +#include "litest-int.h" + +static struct input_event down[] = { + { .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_TRACKING_ID, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_POSITION_X, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_POSITION_Y, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_SYN, .code = SYN_REPORT, .value = 0 }, + { .type = -1, .code = -1 }, +}; + +static struct input_event move[] = { + { .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_POSITION_X, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_MT_POSITION_Y, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_SYN, .code = SYN_REPORT, .value = 0 }, + { .type = -1, .code = -1 }, +}; + +static struct litest_device_interface interface = { + .touch_down_events = down, + .touch_move_events = move, +}; + +static struct input_absinfo absinfo[] = { + { ABS_X, 0, 15360, 0, 0, 128 }, + { ABS_Y, 0, 10240, 0, 0, 128 }, + { ABS_MT_SLOT, 0, 1, 0, 0, 0 }, + { ABS_MT_POSITION_X, 0, 15360, 0, 0, 128 }, + { ABS_MT_POSITION_Y, 0, 10240, 0, 0, 128 }, + { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, + { ABS_MISC, 0, 0, 0, 0, 0 }, + { .value = -1 }, +}; + +static struct input_id input_id = { + .bustype = 0x3, + .vendor = 0x56a, + .product = 0xd1, + .version = 0x110, +}; + +static int events[] = { + EV_KEY, BTN_TOUCH, + INPUT_PROP_MAX, INPUT_PROP_DIRECT, + -1, -1, +}; + +static const char udev_rule[] = +"ACTION==\"remove\", GOTO=\"rule_end\"\n" +"KERNEL!=\"event*\", GOTO=\"rule_end\"\n" +"\n" +"ATTRS{name}==\"litest Wacom Bamboo 2FG 4x5 Finger*\",\\\n" +" ENV{LIBINPUT_DEVICE_GROUP}=\"wacom-bamboo-2fg-group\"\n" +"\n" +"LABEL=\"rule_end\""; + +TEST_DEVICE("wacom-bamboo-2fg-finger", + .type = LITEST_WACOM_BAMBOO_2FG_FINGER, + .features = LITEST_TOUCH, + .interface = &interface, + + .name = "Wacom Bamboo 2F 4x5 Finger", + .id = &input_id, + .events = events, + .absinfo = absinfo, + .udev_rule = udev_rule, +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.9.0/test/litest-device-wacom-bamboo-2fg-pad.c new/libinput-1.9.1/test/litest-device-wacom-bamboo-2fg-pad.c --- old/libinput-1.9.0/test/litest-device-wacom-bamboo-2fg-pad.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libinput-1.9.1/test/litest-device-wacom-bamboo-2fg-pad.c 2017-10-30 06:16:22.000000000 +0100 @@ -0,0 +1,84 @@ +/* + * Copyright © 2017 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include "config.h" + +#include "litest.h" +#include "litest-int.h" + +static struct input_event down[] = { + { .type = -1, .code = -1 }, +}; + +static struct input_event move[] = { + { .type = -1, .code = -1 }, +}; + +static struct litest_device_interface interface = { + .touch_down_events = down, + .touch_move_events = move, +}; + +static struct input_absinfo absinfo[] = { + { ABS_X, 0, 1, 0, 0, 0 }, + { ABS_Y, 0, 1, 0, 0, 0 }, + { .value = -1 }, +}; + +static struct input_id input_id = { + .bustype = 0x3, + .vendor = 0x56a, + .product = 0xd1, + .version = 0x100, +}; + +static int events[] = { + EV_KEY, BTN_LEFT, + EV_KEY, BTN_RIGHT, + EV_KEY, BTN_FORWARD, + EV_KEY, BTN_BACK, + EV_KEY, BTN_STYLUS, + -1, -1, +}; + +static const char udev_rule[] = +"ACTION==\"remove\", GOTO=\"pad_end\"\n" +"KERNEL!=\"event*\", GOTO=\"pad_end\"\n" +"\n" +"ATTRS{name}==\"litest Wacom Bamboo 2FG 4x5 Pad*\",\\\n" +" ENV{ID_INPUT_TABLET_PAD}=\"1\",\\\n" +" ENV{LIBINPUT_DEVICE_GROUP}=\"wacom-bamboo-2fg-group\"\n" +"\n" +"LABEL=\"pad_end\""; + +TEST_DEVICE("wacom-bamboo-2fg-pad", + .type = LITEST_WACOM_BAMBOO_2FG_PAD, + .features = LITEST_TABLET_PAD, + .interface = &interface, + + .name = "Wacom Bamboo 2FG 4x5 Pad", + .id = &input_id, + .events = events, + .absinfo = absinfo, + .udev_rule = udev_rule, +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.9.0/test/litest-device-wacom-bamboo-2fg-pen.c new/libinput-1.9.1/test/litest-device-wacom-bamboo-2fg-pen.c --- old/libinput-1.9.0/test/litest-device-wacom-bamboo-2fg-pen.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libinput-1.9.1/test/litest-device-wacom-bamboo-2fg-pen.c 2017-10-30 06:16:22.000000000 +0100 @@ -0,0 +1,120 @@ +/* + * Copyright © 2017 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include "config.h" + +#include "litest.h" +#include "litest-int.h" + +static struct input_event proximity_in[] = { + { .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_DISTANCE, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_PRESSURE, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_KEY, .code = BTN_TOOL_PEN, .value = 1 }, + { .type = EV_SYN, .code = SYN_REPORT, .value = 0 }, + { .type = -1, .code = -1 }, +}; + +static struct input_event proximity_out[] = { + { .type = EV_ABS, .code = ABS_X, .value = 0 }, + { .type = EV_ABS, .code = ABS_Y, .value = 0 }, + { .type = EV_ABS, .code = ABS_DISTANCE, .value = 0 }, + { .type = EV_KEY, .code = BTN_TOOL_PEN, .value = 0 }, + { .type = EV_SYN, .code = SYN_REPORT, .value = 0 }, + { .type = -1, .code = -1 }, +}; + +static struct input_event motion[] = { + { .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_DISTANCE, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_ABS, .code = ABS_PRESSURE, .value = LITEST_AUTO_ASSIGN }, + { .type = EV_SYN, .code = SYN_REPORT, .value = 0 }, + { .type = -1, .code = -1 }, +}; + +static int +get_axis_default(struct litest_device *d, unsigned int evcode, int32_t *value) +{ + switch (evcode) { + case ABS_PRESSURE: + *value = 100; + return 0; + } + return 1; +} + +static struct litest_device_interface interface = { + .tablet_proximity_in_events = proximity_in, + .tablet_proximity_out_events = proximity_out, + .tablet_motion_events = motion, + + .get_axis_default = get_axis_default, +}; + +static struct input_absinfo absinfo[] = { + { ABS_X, 0, 14720, 4, 0, 100 }, + { ABS_Y, 0, 9200, 4, 0, 100 }, + { ABS_PRESSURE, 0, 1023, 0, 0, 0 }, + { ABS_DISTANCE, 0, 31, 0, 0, 0 }, + { .value = -1 }, +}; + +static struct input_id input_id = { + .bustype = 0x3, + .vendor = 0x56a, + .product = 0xd1, + .version = 0x100, +}; + +static int events[] = { + EV_KEY, BTN_TOOL_PEN, + EV_KEY, BTN_TOOL_RUBBER, + EV_KEY, BTN_TOUCH, + EV_KEY, BTN_STYLUS, + EV_KEY, BTN_STYLUS2, + INPUT_PROP_MAX, INPUT_PROP_POINTER, + -1, -1, +}; + +static const char udev_rule[] = +"ACTION==\"remove\", GOTO=\"pad_end\"\n" +"KERNEL!=\"event*\", GOTO=\"pad_end\"\n" +"\n" +"ATTRS{name}==\"litest Wacom Bamboo 2FG 4x5 Pen*\",\\\n" +" ENV{LIBINPUT_DEVICE_GROUP}=\"wacom-bamboo-2fg-group\"\n" +"\n" +"LABEL=\"pad_end\""; + +TEST_DEVICE("wacom-bamboo-2fg-pen", + .type = LITEST_WACOM_BAMBOO_2FG_PEN, + .features = LITEST_TABLET | LITEST_DISTANCE, + .interface = &interface, + + .name = "Wacom Bamboo 2FG 4x5 Pen", + .id = &input_id, + .events = events, + .absinfo = absinfo, + .udev_rule = udev_rule, +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.9.0/test/litest-device-wacom-cintiq-13hdt-pad.c new/libinput-1.9.1/test/litest-device-wacom-cintiq-13hdt-pad.c --- old/libinput-1.9.0/test/litest-device-wacom-cintiq-13hdt-pad.c 2017-10-19 05:59:03.000000000 +0200 +++ new/libinput-1.9.1/test/litest-device-wacom-cintiq-13hdt-pad.c 2017-10-30 06:16:22.000000000 +0100 @@ -72,7 +72,7 @@ static struct input_id input_id = { .bustype = 0x3, .vendor = 0x56a, - .product = 0x33, + .product = 0x333, .version = 0x110, }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.9.0/test/litest-device-wacom-mobilestudio-pro-pad.c new/libinput-1.9.1/test/litest-device-wacom-mobilestudio-pro-pad.c --- old/libinput-1.9.0/test/litest-device-wacom-mobilestudio-pro-pad.c 2017-10-19 05:59:03.000000000 +0200 +++ new/libinput-1.9.1/test/litest-device-wacom-mobilestudio-pro-pad.c 2017-10-30 06:16:22.000000000 +0100 @@ -87,6 +87,7 @@ EV_KEY, BTN_6, EV_KEY, BTN_7, EV_KEY, BTN_8, + EV_KEY, BTN_9, EV_KEY, BTN_SOUTH, EV_KEY, BTN_EAST, EV_KEY, BTN_C, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.9.0/test/litest.h new/libinput-1.9.1/test/litest.h --- old/libinput-1.9.0/test/litest.h 2017-10-19 05:59:03.000000000 +0200 +++ new/libinput-1.9.1/test/litest.h 2017-10-30 06:16:22.000000000 +0100 @@ -265,6 +265,9 @@ LITEST_UCLOGIC_TABLET, LITEST_KEYBOARD_BLADE_STEALTH, LITEST_KEYBOARD_BLADE_STEALTH_VIDEOSWITCH, + LITEST_WACOM_BAMBOO_2FG_PAD, + LITEST_WACOM_BAMBOO_2FG_PEN, + LITEST_WACOM_BAMBOO_2FG_FINGER, }; enum litest_device_feature { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.9.0/test/test-switch.c new/libinput-1.9.1/test/test-switch.c --- old/libinput-1.9.0/test/test-switch.c 2017-10-19 05:59:03.000000000 +0200 +++ new/libinput-1.9.1/test/test-switch.c 2017-10-30 06:16:22.000000000 +0100 @@ -513,30 +513,32 @@ keyboard = litest_add_device(li, LITEST_KEYBOARD); - litest_switch_action(sw, - LIBINPUT_SWITCH_LID, - LIBINPUT_SWITCH_STATE_ON); - litest_drain_events(li); - - litest_event(keyboard, EV_KEY, KEY_A, 1); - litest_event(keyboard, EV_SYN, SYN_REPORT, 0); - litest_event(keyboard, EV_KEY, KEY_A, 0); - litest_event(keyboard, EV_SYN, SYN_REPORT, 0); - libinput_dispatch(li); - - event = libinput_get_event(li); - litest_is_switch_event(event, - LIBINPUT_SWITCH_LID, - LIBINPUT_SWITCH_STATE_OFF); - - litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); - - litest_switch_action(sw, - LIBINPUT_SWITCH_LID, - LIBINPUT_SWITCH_STATE_OFF); - litest_assert_empty_queue(li); + for (int i = 0; i < 3; i++) { + litest_switch_action(sw, + LIBINPUT_SWITCH_LID, + LIBINPUT_SWITCH_STATE_ON); + litest_drain_events(li); + + litest_event(keyboard, EV_KEY, KEY_A, 1); + litest_event(keyboard, EV_SYN, SYN_REPORT, 0); + litest_event(keyboard, EV_KEY, KEY_A, 0); + litest_event(keyboard, EV_SYN, SYN_REPORT, 0); + libinput_dispatch(li); + + event = libinput_get_event(li); + litest_is_switch_event(event, + LIBINPUT_SWITCH_LID, + LIBINPUT_SWITCH_STATE_OFF); + libinput_event_destroy(event); + + litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); + + litest_switch_action(sw, + LIBINPUT_SWITCH_LID, + LIBINPUT_SWITCH_STATE_OFF); + litest_assert_empty_queue(li); + } - libinput_event_destroy(event); litest_delete_device(keyboard); } END_TEST diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libinput-1.9.0/udev/libinput-device-group.c new/libinput-1.9.1/udev/libinput-device-group.c --- old/libinput-1.9.0/udev/libinput-device-group.c 2017-10-19 05:59:03.000000000 +0200 +++ new/libinput-1.9.1/udev/libinput-device-group.c 2017-10-30 06:16:22.000000000 +0100 @@ -216,11 +216,10 @@ #endif snprintf(group, sizeof(group), - "%x/%x/%x/%x:%s", + "%x/%x/%x:%s", bustype, vendor_id, product_id, - version, phys); }