Hello community,

here is the log from the commit of package libinput for openSUSE:Factory 
checked in at 2017-12-19 10:44:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libinput (Old)
 and      /work/SRC/openSUSE:Factory/.libinput.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libinput"

Tue Dec 19 10:44:53 2017 rev:55 rq:556898 version:1.9.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/libinput/libinput.changes        2017-12-13 
11:55:37.292634670 +0100
+++ /work/SRC/openSUSE:Factory/.libinput.new/libinput.changes   2017-12-19 
10:44:57.144554076 +0100
@@ -1,0 +2,7 @@
+Thu Dec 14 08:33:23 UTC 2017 - [email protected]
+
+- Update to new upstream release 1.9.4
+  * This fixes a regression introduced in 1.9.3 where some key
+    events got lost or arrived out-of-order.
+
+-------------------------------------------------------------------

Old:
----
  libinput-1.9.3.tar.xz
  libinput-1.9.3.tar.xz.sig

New:
----
  libinput-1.9.4.tar.xz
  libinput-1.9.4.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libinput.spec ++++++
--- /var/tmp/diff_new_pack.Uy5p9y/_old  2017-12-19 10:44:57.724526078 +0100
+++ /var/tmp/diff_new_pack.Uy5p9y/_new  2017-12-19 10:44:57.724526078 +0100
@@ -18,7 +18,7 @@
 
 Name:           libinput
 %define lname  libinput10
-Version:        1.9.3
+Version:        1.9.4
 Release:        0
 Summary:        Input device and event processing library
 License:        MIT

++++++ libinput-1.9.3.tar.xz -> libinput-1.9.4.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.9.3/meson.build 
new/libinput-1.9.4/meson.build
--- old/libinput-1.9.3/meson.build      2017-11-28 06:13:06.000000000 +0100
+++ new/libinput-1.9.4/meson.build      2017-12-14 07:18:13.000000000 +0100
@@ -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')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.9.3/src/evdev-fallback.c 
new/libinput-1.9.4/src/evdev-fallback.c
--- old/libinput-1.9.3/src/evdev-fallback.c     2017-11-28 06:13:06.000000000 
+0100
+++ new/libinput-1.9.4/src/evdev-fallback.c     2017-12-14 07:18:13.000000000 
+0100
@@ -501,6 +501,22 @@
        }
 
        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 @@
        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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.9.3/test/test-keyboard.c 
new/libinput-1.9.4/test/test-keyboard.c
--- old/libinput-1.9.3/test/test-keyboard.c     2017-11-28 06:13:06.000000000 
+0100
+++ new/libinput-1.9.4/test/test-keyboard.c     2017-12-14 07:18:13.000000000 
+0100
@@ -365,6 +365,61 @@
 }
 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_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);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.9.3/tools/libinput-measure-touch-size 
new/libinput-1.9.4/tools/libinput-measure-touch-size
--- old/libinput-1.9.3/tools/libinput-measure-touch-size        2017-11-28 
06:13:06.000000000 +0100
+++ new/libinput-1.9.4/tools/libinput-measure-touch-size        2017-12-14 
07:18:13.000000000 +0100
@@ -186,6 +186,9 @@
             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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libinput-1.9.3/tools/libinput-measure-touchpad-pressure 
new/libinput-1.9.4/tools/libinput-measure-touchpad-pressure
--- old/libinput-1.9.3/tools/libinput-measure-touchpad-pressure 2017-11-28 
06:13:06.000000000 +0100
+++ new/libinput-1.9.4/tools/libinput-measure-touchpad-pressure 2017-12-14 
07:18:13.000000000 +0100
@@ -145,6 +145,9 @@
             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)
         #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libinput-1.9.3/tools/libinput-measure-trackpoint-range 
new/libinput-1.9.4/tools/libinput-measure-trackpoint-range
--- old/libinput-1.9.3/tools/libinput-measure-trackpoint-range  2017-11-28 
06:13:06.000000000 +0100
+++ new/libinput-1.9.4/tools/libinput-measure-trackpoint-range  2017-12-14 
07:18:13.000000000 +0100
@@ -60,6 +60,8 @@
 
         self.device = evdev.InputDevice(self.path)
 
+        print("Using {}: {}\n".format(self.device.name, path))
+
         self.deltas = []
         self.nxdeltas = 0
         self.nydeltas = 0
@@ -189,7 +191,7 @@
     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))
 


Reply via email to