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

libinput: Changes to 'debian-unstable'



 debian/changelog                         |    9 ++++
 debian/patches/series                    |    1 
 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 +-
 8 files changed, 93 insertions(+), 20 deletions(-)

New commits:
commit 2557791d7be44a3e1e3344b0ae568fa4cbecc08e
Author: Timo Aaltonen <tjaalton@debian.org>
Date:   Thu Dec 14 12:48:32 2017 +0200

    release to unstable

diff --git a/debian/changelog b/debian/changelog
index f21f525..5df47d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,11 @@
-libinput (1.9.4-1) UNRELEASED; urgency=medium
+libinput (1.9.4-1) unstable; urgency=medium
 
   * New upstream release.
   * Add fix-lp1696929.patch to fix unresponsive/laggy touchpad behaviour
     caused by inappropriate use of software hysteresis (LP: #1696929).
     Thanks, Daniel van Vugt!
 
- -- Timo Aaltonen <tjaalton@debian.org>  Thu, 14 Dec 2017 12:09:03 +0200
+ -- Timo Aaltonen <tjaalton@debian.org>  Thu, 14 Dec 2017 12:40:25 +0200
 
 libinput (1.9.3-1) unstable; urgency=medium
 

commit ae1f65f5b9e2ca767031ce963a104d73723fdca2
Author: Timo Aaltonen <tjaalton@debian.org>
Date:   Thu Dec 14 12:39:34 2017 +0200

    Add fix-lp1696929.patch to fix unresponsive/laggy touchpad behaviour
    
    caused by inappropriate use of software hysteresis (LP: #1696929).
    Thanks, Daniel van Vugt!

diff --git a/debian/changelog b/debian/changelog
index 509a33b..f21f525 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
 libinput (1.9.4-1) UNRELEASED; urgency=medium
 
   * New upstream release.
+  * Add fix-lp1696929.patch to fix unresponsive/laggy touchpad behaviour
+    caused by inappropriate use of software hysteresis (LP: #1696929).
+    Thanks, Daniel van Vugt!
 
  -- Timo Aaltonen <tjaalton@debian.org>  Thu, 14 Dec 2017 12:09:03 +0200
 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f34d61a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix-lp1696929.patch

commit 9caeafb81e4a677b89ff9469435bf7f2dfd0ecb1
Author: Timo Aaltonen <tjaalton@debian.org>
Date:   Thu Dec 14 12:15:05 2017 +0200

    bump the changelog

diff --git a/debian/changelog b/debian/changelog
index 1619b61..509a33b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libinput (1.9.4-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+
+ -- Timo Aaltonen <tjaalton@debian.org>  Thu, 14 Dec 2017 12:09:03 +0200
+
 libinput (1.9.3-1) unstable; urgency=medium
 
   * New upstream release.

commit a5c19a57902713bf9d47e3d8bde1d6a30bac6db1
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Dec 14 15:51:53 2017 +1000

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

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 <peter.hutterer@who-t.net>
Date:   Thu Nov 30 14:21:22 2017 +1000

    tools: print the device in all measure tools
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (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 <peter.hutterer@who-t.net>
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 <peter.hutterer@who-t.net>
    (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 <peter.hutterer@who-t.net>
Date:   Wed Nov 29 11:31:10 2017 +1000

    tools: clarify PermissionError in measure-trackpoint-range
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (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 <peter.hutterer@who-t.net>
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 correctly but the events are sent in the
    order of the event codes. KEY_A sorts before KEY_LEFTSHIFT and our shift + A
    becomes A + shift.
    
    Fix this by treating key events as before db3b6fe5f7f8 - by sending them out
    as we get them.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=104030
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 1c8636923b7d8245a5f55dfbfa191c0129ad4414)

diff --git a/src/evdev-fallback.c b/src/evdev-fallback.c
index 7bfcaf9..d45f604 100644
--- a/src/evdev-fallback.c
+++ b/src/evdev-fallback.c
@@ -501,6 +501,22 @@ fallback_process_key(struct fallback_dispatch *dispatch,
 	}
 
 	hw_set_key_down(dispatch, e->code, e->value);
+
+	switch (type) {
+	case KEY_TYPE_NONE:
+		break;
+	case KEY_TYPE_KEY:
+		fallback_keyboard_notify_key(
+			     dispatch,
+			     device,
+			     time,
+			     e->code,
+			     e->value ? LIBINPUT_KEY_STATE_PRESSED :
+					LIBINPUT_KEY_STATE_RELEASED);
+		break;
+	case KEY_TYPE_BUTTON:
+		break;
+	}
 }
 
 static void
@@ -827,27 +843,10 @@ fallback_handle_state(struct fallback_dispatch *dispatch,
 	if (dispatch->pending_event & EVDEV_KEY) {
 		bool want_debounce = false;
 		for (unsigned int code = 0; code <= KEY_MAX; code++) {
-			bool new_state;
-
 			if (!hw_key_has_changed(dispatch, code))
 				continue;
 
-			new_state = hw_is_key_down(dispatch, code);
-
-			switch (get_key_type(code)) {
-			case KEY_TYPE_NONE:
-				break;
-			case KEY_TYPE_KEY:
-				fallback_keyboard_notify_key(
-						     dispatch,
-						     device,
-						     time,
-						     code,
-						     new_state ?
-							     LIBINPUT_KEY_STATE_PRESSED :
-							     LIBINPUT_KEY_STATE_RELEASED);
-				break;
-			case KEY_TYPE_BUTTON:
+			if (get_key_type(code) == KEY_TYPE_BUTTON) {
 				want_debounce = true;
 				break;
 			}
diff --git a/test/test-keyboard.c b/test/test-keyboard.c
index dc2e630..db83638 100644
--- a/test/test-keyboard.c
+++ b/test/test-keyboard.c
@@ -365,6 +365,61 @@ START_TEST(keyboard_no_buttons)
 }
 END_TEST
 
+START_TEST(keyboard_frame_order)
+{
+	struct litest_device *dev = litest_current_device();
+	struct libinput *li = dev->libinput;
+
+	if (!libevdev_has_event_code(dev->evdev, EV_KEY, KEY_A) ||
+	    !libevdev_has_event_code(dev->evdev, EV_KEY, KEY_LEFTSHIFT))
+		return;
+
+	litest_drain_events(li);
+
+	litest_event(dev, EV_KEY, KEY_LEFTSHIFT, 1);
+	litest_event(dev, EV_KEY, KEY_A, 1);
+	litest_event(dev, EV_SYN, SYN_REPORT, 0);
+	libinput_dispatch(li);
+
+	litest_assert_key_event(li,
+				KEY_LEFTSHIFT,
+				LIBINPUT_KEY_STATE_PRESSED);
+	litest_assert_key_event(li, KEY_A, LIBINPUT_KEY_STATE_PRESSED);
+
+	litest_event(dev, EV_KEY, KEY_LEFTSHIFT, 0);
+	litest_event(dev, EV_KEY, KEY_A, 0);
+	litest_event(dev, EV_SYN, SYN_REPORT, 0);
+	libinput_dispatch(li);
+
+	litest_assert_key_event(li,
+				KEY_LEFTSHIFT,
+				LIBINPUT_KEY_STATE_RELEASED);
+	litest_assert_key_event(li, KEY_A, LIBINPUT_KEY_STATE_RELEASED);
+
+	litest_event(dev, EV_KEY, KEY_A, 1);
+	litest_event(dev, EV_KEY, KEY_LEFTSHIFT, 1);
+	litest_event(dev, EV_SYN, SYN_REPORT, 0);
+	libinput_dispatch(li);
+
+	litest_assert_key_event(li, KEY_A, LIBINPUT_KEY_STATE_PRESSED);
+	litest_assert_key_event(li,
+				KEY_LEFTSHIFT,
+				LIBINPUT_KEY_STATE_PRESSED);
+
+	litest_event(dev, EV_KEY, KEY_A, 0);
+	litest_event(dev, EV_KEY, KEY_LEFTSHIFT, 0);
+	litest_event(dev, EV_SYN, SYN_REPORT, 0);
+	libinput_dispatch(li);
+
+	litest_assert_key_event(li, KEY_A, LIBINPUT_KEY_STATE_RELEASED);
+	litest_assert_key_event(li,
+				KEY_LEFTSHIFT,
+				LIBINPUT_KEY_STATE_RELEASED);
+
+	libinput_dispatch(li);
+}
+END_TEST
+
 START_TEST(keyboard_leds)
 {
 	struct litest_device *dev = litest_current_device();
@@ -432,6 +487,7 @@ litest_setup_tests_keyboard(void)
 	litest_add("keyboard:time", keyboard_time_usec, LITEST_KEYS, LITEST_ANY);
 
 	litest_add("keyboard:events", keyboard_no_buttons, LITEST_KEYS, LITEST_ANY);
+	litest_add("keyboard:events", keyboard_frame_order, LITEST_KEYS, LITEST_ANY);
 
 	litest_add("keyboard:leds", keyboard_leds, LITEST_ANY, LITEST_ANY);
 


Reply to: