[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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 Hutterer <peter.hutterer@who-t.net>
Date:   Tue Apr 19 09:11:25 2016 +1000

    libinput 1.2.4
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

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 <peter.fruehberger@gmail.com>
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 <peter.fruehberger@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    (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 <peter.hutterer@who-t.net>
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 <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    (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 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:SynPS/2 Synaptics TouchPad:dmi:*pn*Alex*
-libinput:name:Cypress APA Trackpad (cyapa):dmi:*svn*SAMSUNG*:pn*Lumpy*
+libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*svn*SAMSUNG*:pn*Lumpy*
 libinput:name:Atmel maXTouch Touchpad:dmi:*svn*GOOGLE*:pn*Samus*
  LIBINPUT_MODEL_CHROMEBOOK=1
 
-libinput:name:Cypress APA Trackpad (cyapa):dmi:*
+libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*
  LIBINPUT_MODEL_CYAPA=1
 
 ##########################################

commit 4ae3d7fb49405f9c59f08d0dce4999fca2f8a478
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Apr 12 08:36:48 2016 +1000

    tablet: add a fuzz-filter to avoid spamming callers with subpixel updates
    
    This is especially a problem for the cursor tool which can be legitimately
    left on the tablet. It wobbles by a couple of device units, resulting in
    continuous axis updates to the caller. Pre-filter any of these events by the
    axis' fuzz value so we don't even process them.
    
    For ABS_DISTANCE which doesn't have a fuzz we hard-code a minimum fuzz of 2.
    This should eventually land in the kernel though.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=94892
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
    (cherry picked from commit 60a8ba9f3e3210a2dceabc834af9a140f548c1af)

diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index 84563a8..be828d9 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -112,6 +112,36 @@ tablet_device_has_axis(struct tablet_dispatch *tablet,
 	return has_axis;
 }
 
+static inline bool
+tablet_filter_axis_fuzz(const struct tablet_dispatch *tablet,
+			const struct evdev_device *device,
+			const struct input_event *e,
+			enum libinput_tablet_tool_axis axis)
+{
+	int delta, fuzz;
+	int current, previous;
+
+	previous = tablet->prev_value[axis];
+	current = e->value;
+	delta = previous - current;
+
+	fuzz = libevdev_get_abs_fuzz(device->evdev, e->code);
+
+	/* ABS_DISTANCE doesn't have have fuzz set and causes continuous
+	 * updates for the cursor/lens tools. Add a minimum fuzz of 2, same
+	 * as the xf86-input-wacom driver
+	 */
+	switch (e->code) {
+	case ABS_DISTANCE:
+		fuzz = max(2, fuzz);
+		break;
+	default:
+		break;
+	}
+
+	return abs(delta) <= fuzz;
+}
+
 static void
 tablet_process_absolute(struct tablet_dispatch *tablet,
 			struct evdev_device *device,
@@ -137,6 +167,11 @@ tablet_process_absolute(struct tablet_dispatch *tablet,
 			break;
 		}
 
+		tablet->prev_value[axis] = tablet->current_value[axis];
+		if (tablet_filter_axis_fuzz(tablet, device, e, axis))
+			break;
+
+		tablet->current_value[axis] = e->value;
 		set_bit(tablet->changed_axes, axis);
 		tablet_set_status(tablet, TABLET_AXES_UPDATED);
 		break;
diff --git a/src/evdev-tablet.h b/src/evdev-tablet.h
index 880d523..d12c675 100644
--- a/src/evdev-tablet.h
+++ b/src/evdev-tablet.h
@@ -55,6 +55,8 @@ struct tablet_dispatch {
 	unsigned char changed_axes[NCHARS(LIBINPUT_TABLET_TOOL_AXIS_MAX + 1)];
 	struct tablet_axes axes;
 	unsigned char axis_caps[NCHARS(LIBINPUT_TABLET_TOOL_AXIS_MAX + 1)];
+	int current_value[LIBINPUT_TABLET_TOOL_AXIS_MAX + 1];
+	int prev_value[LIBINPUT_TABLET_TOOL_AXIS_MAX + 1];
 
 	/* Only used for tablets that don't report serial numbers */
 	struct list tool_list;

commit 6e8561390d7f41bb373c3e5acd7da5bf6846c6d2
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Apr 7 15:44:23 2016 +1000

    test: reduce the default abs-max range to avoid ENOMEM
    
    This path is hit when we set up an abs device without setting specific axis
    ranges. Usually because we only care that the axis is there, not the values,
    see the tests of invalid devices.
    
    0xffff is fine as max for most axes but setting it for ABS_MT_SLOT can cause
    allocation errors. Reduce to 100 because we don't care about the range anyway
    and 100 is still big enough for basic tests.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit c420747be49cb6505b62a0700dbc3dc998c0862b)

diff --git a/test/litest.c b/test/litest.c
index f679652..8ac9f1d 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -2057,7 +2057,7 @@ litest_create_uinput(const char *name,
 	const struct input_absinfo default_abs = {
 		.value = 0,
 		.minimum = 0,
-		.maximum = 0xffff,
+		.maximum = 100,
 		.fuzz = 0,
 		.flat = 0,
 		.resolution = 100


Reply to: