From ca9da65cff62c793ac5e745841b44703d524ae8d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 23 Feb 2015 09:01:08 +1000 Subject: [PATCH 1/5] cosmetic: fix a whitespace issue Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad-tap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c index 0e37c5ee..33c6da64 100644 --- a/src/evdev-mt-touchpad-tap.c +++ b/src/evdev-mt-touchpad-tap.c @@ -573,7 +573,7 @@ tp_tap_handle_state(struct tp_dispatch *tp, uint64_t time) tp_tap_handle_event(tp, t, TAP_EVENT_RELEASE, time); t->tap.state = TAP_TOUCH_STATE_IDLE; } else if (tp->tap.state != TAP_STATE_IDLE && - tp_tap_exceeds_motion_threshold(tp, t)) { + tp_tap_exceeds_motion_threshold(tp, t)) { struct tp_touch *tmp; /* Any touch exceeding the threshold turns all From 02d8bc766b7f9b76d48a49706189419d2dc9f171 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 23 Feb 2015 10:26:56 +1000 Subject: [PATCH 2/5] doc: add missing space Signed-off-by: Peter Hutterer --- doc/device-configuration-via-udev.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/device-configuration-via-udev.dox b/doc/device-configuration-via-udev.dox index 68a45af0..9c44a515 100644 --- a/doc/device-configuration-via-udev.dox +++ b/doc/device-configuration-via-udev.dox @@ -2,7 +2,7 @@ @page udev_config Static device configuration via udev libinput supports some static configuration through udev properties. -These propertiesare read when the device is initially added +These properties are read when the device is initially added to libinput's device list, i.e. before the @ref LIBINPUT_EVENT_DEVICE_ADDED event is generated. From 79e64ce0b51a62b6827729bc194a88c013c66b5d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 23 Feb 2015 10:28:02 +1000 Subject: [PATCH 3/5] doc: document udev device tagging Signed-off-by: Peter Hutterer --- doc/device-configuration-via-udev.dox | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/doc/device-configuration-via-udev.dox b/doc/device-configuration-via-udev.dox index 9c44a515..4107f943 100644 --- a/doc/device-configuration-via-udev.dox +++ b/doc/device-configuration-via-udev.dox @@ -20,6 +20,16 @@ the value itself is irrelevant otherwise.
ID_SEAT
Assigns the physical seat for this device. See libinput_seat_get_physical_name(). Defaults to "seat0".
+
ID_INPUT
+
If this property is set, the device is considered an input device. Any +device with this property missing will be ignored, see @ref +udev_device_type. +
+
ID_INPUT_KEYBOARD, ID_INPUT_KEY, ID_INPUT_MOUSE, ID_INPUT_TOUCHPAD, +ID_INPUT_TOUCHSCREEN, ID_INPUT_TABLET, ID_INPUT_JOYSTICK, +ID_INPUT_ACCELEROMETER
+
If any of the above is set, libinput initializes the device as the given +type, see @ref udev_device_type.
WL_SEAT
Assigns the logical seat for this device. See libinput_seat_get_logical_name() @@ -41,4 +51,29 @@ ACTION=="add|change", KERNEL=="event[0-9]*", ENV{ID_VENDOR_ID}=="012a", \ ENV{ID_MODEL_ID}=="034b", ENV{ID_SEAT}="seat1" @endcode + +@section udev_device_type Device type assignment via udev + +libinput requires the ID_INPUT property to be set on a device, +otherwise the device will be ignored. In addition, one of +ID_INPUT_KEYBOARD, ID_INPUT_KEY, ID_INPUT_MOUSE, ID_INPUT_TOUCHPAD, +ID_INPUT_TOUCHSCREEN, ID_INPUT_TABLET, ID_INPUT_JOYSTICK, +ID_INPUT_ACCELEROMETER must be set on the device to determine the +device type. The usual error handling applies within libinput and a device +type label does not guarantee that the device is initialized by libinput. +If a device fails to meet the requirements for a device type (e.g. a keyboard +labelled as touchpad) the device will not be available through libinput. + +Only one device type should be set per device at a type, though libinput can +handle some combinations for historical reasons. + +Below is an example udev rule to remove an ID_INPUT_TOUCHPAD setting +and change it into an ID_INPUT_TABLET setting. This rule would apply +for a device with the vendor/model ID of 012a/034b. + +@code +ACTION=="add|change", KERNEL=="event[0-9]*", ENV{ID_VENDOR_ID}=="012a", \ +ENV{ID_MODEL_ID}=="034b", ENV{ID_INPUT_TOUCHPAD}="", ENV{ID_INPUT_TABLET}="1" +@endcode + */ From 6c5be5c77fbb68e97d4aa0ee50993b3ec908a7e0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 23 Feb 2015 09:59:36 +1000 Subject: [PATCH 4/5] configure.ac: libinput 0.11.0 Signed-off-by: Peter Hutterer --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 2ccd30d7..1a4eb3af 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_PREREQ([2.64]) m4_define([libinput_major_version], [0]) -m4_define([libinput_minor_version], [10]) +m4_define([libinput_minor_version], [11]) m4_define([libinput_micro_version], [0]) m4_define([libinput_version], [libinput_major_version.libinput_minor_version.libinput_micro_version]) @@ -30,7 +30,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) # - If binary compatibility has been broken (eg removed or changed interfaces) # change to C+1:0:0 # - If the interface is the same as the previous version, change to C:R+1:A -LIBINPUT_LT_VERSION=8:1:1 +LIBINPUT_LT_VERSION=9:0:2 AC_SUBST(LIBINPUT_LT_VERSION) AM_SILENT_RULES([yes]) From 28407339781c3561c5d72fc12b7428d01f7d50e9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 23 Feb 2015 13:49:10 +1000 Subject: [PATCH 5/5] cosmetic: drop more double empty lines Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 1 - src/evdev-mt-touchpad.h | 1 - test/touchpad.c | 5 ----- 3 files changed, 7 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index ae37ab17..e0b0c364 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -934,7 +934,6 @@ tp_destroy(struct evdev_dispatch *dispatch) struct tp_dispatch *tp = (struct tp_dispatch*)dispatch; - free(tp->touches); free(tp); } diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h index 3479e5ea..d552c26d 100644 --- a/src/evdev-mt-touchpad.h +++ b/src/evdev-mt-touchpad.h @@ -20,7 +20,6 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - #ifndef EVDEV_MT_TOUCHPAD_H #define EVDEV_MT_TOUCHPAD_H diff --git a/test/touchpad.c b/test/touchpad.c index 9c34b506..9b3ba812 100644 --- a/test/touchpad.c +++ b/test/touchpad.c @@ -791,7 +791,6 @@ START_TEST(touchpad_click_defaults_none) } END_TEST - START_TEST(touchpad_1fg_clickfinger) { struct litest_device *dev = litest_current_device(); @@ -929,7 +928,6 @@ START_TEST(touchpad_clickfinger_to_area_method_while_down) litest_assert_button_event(li, BTN_RIGHT, LIBINPUT_BUTTON_STATE_RELEASED); - litest_drain_events(li); /* use bottom right corner to catch accidental softbutton right */ @@ -1742,7 +1740,6 @@ START_TEST(clickpad_topsoftbuttons_clickfinger_dev_disabled) } END_TEST - static void test_2fg_scroll(struct litest_device *dev, double dx, double dy, int want_sleep) { @@ -2490,7 +2487,6 @@ START_TEST(touchpad_left_handed_delayed) struct libinput *li = dev->libinput; enum libinput_config_status status; - litest_drain_events(li); litest_button_click(dev, BTN_LEFT, 1); libinput_dispatch(li); @@ -2983,7 +2979,6 @@ assert_btnevent_from_device(struct litest_device *device, libinput_event_destroy(e); } - START_TEST(touchpad_trackpoint_buttons) { struct litest_device *touchpad = litest_current_device();