From 040c8d943a2b205ecbc8fd8df6392417d303df85ff89856cb2a33d9be0f9a438 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 4 Mar 2017 13:29:02 +0000 Subject: [PATCH 1/2] Accepting request 461695 from home:Zaitor:branches:X11:Wayland Add upstream patches from the stable branch OBS-URL: https://build.opensuse.org/request/show/461695 OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/libinput?expand=0&rev=110 --- libinput-fix-crasher.patch | 71 ++++++++++++++++++++++++++++++++++++++ libinput.changes | 6 ++++ libinput.spec | 3 ++ 3 files changed, 80 insertions(+) create mode 100644 libinput-fix-crasher.patch diff --git a/libinput-fix-crasher.patch b/libinput-fix-crasher.patch new file mode 100644 index 0000000..126ecb2 --- /dev/null +++ b/libinput-fix-crasher.patch @@ -0,0 +1,71 @@ +From 7b11fef3490277317f4a794beeadf206a48844f6 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 24 Feb 2017 10:10:44 +1000 +Subject: Fix a crash when requesting invalid mode group indices + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +(cherry picked from commit c787ccf270f44007dbadce72c1516b819c2ca5ce) + +diff --git a/src/evdev-tablet-pad-leds.c b/src/evdev-tablet-pad-leds.c +index 209ab73..89b3b9d 100644 +--- a/src/evdev-tablet-pad-leds.c ++++ b/src/evdev-tablet-pad-leds.c +@@ -645,5 +645,9 @@ evdev_device_tablet_pad_get_mode_group(struct evdev_device *device, + if (!(device->seat_caps & EVDEV_DEVICE_TABLET_PAD)) + return NULL; + ++ if (index >= ++ (unsigned int)evdev_device_tablet_pad_get_num_mode_groups(device)) ++ return NULL; ++ + return pad_get_mode_group(pad, index); + } +-- +cgit v0.10.2 + + +From 3940ab7f40a39a045e888068d199871e6d669392 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 24 Feb 2017 10:15:23 +1000 +Subject: tools: add mode group info to libinput-list-devices + +We don't cater for the special case of groups having a different number of +modes, there is no hardware right now that does that. + +Signed-off-by: Peter Hutterer +Reviewed-by: Hans de Goede +(cherry picked from commit 38c675c9599fabeb8c530ab74898524a71cacf75) + +diff --git a/tools/libinput-list-devices.c b/tools/libinput-list-devices.c +index e202388..8fd25df 100644 +--- a/tools/libinput-list-devices.c ++++ b/tools/libinput-list-devices.c +@@ -245,16 +245,23 @@ rotation_default(struct libinput_device *device) + static void + print_pad_info(struct libinput_device *device) + { +- int nbuttons, nrings, nstrips; ++ int nbuttons, nrings, nstrips, ngroups, nmodes; ++ struct libinput_tablet_pad_mode_group *group; + + nbuttons = libinput_device_tablet_pad_get_num_buttons(device); + nrings = libinput_device_tablet_pad_get_num_rings(device); + nstrips = libinput_device_tablet_pad_get_num_strips(device); ++ ngroups = libinput_device_tablet_pad_get_num_mode_groups(device); ++ ++ group = libinput_device_tablet_pad_get_mode_group(device, 0); ++ nmodes = libinput_tablet_pad_mode_group_get_num_modes(group); + + printf("Pad:\n"); + printf(" Rings: %d\n", nrings); + printf(" Strips: %d\n", nstrips); + printf(" Buttons: %d\n", nbuttons); ++ printf(" Mode groups: %d (%d modes)\n", ngroups, nmodes); ++ + } + + static void +-- +cgit v0.10.2 + diff --git a/libinput.changes b/libinput.changes index c10ed86..6236cd3 100644 --- a/libinput.changes +++ b/libinput.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 1 19:51:34 UTC 2017 - zaitor@opensuse.org + +- Add libinput-fix-crasher.patch: Fix a crash when requesting + invalid mode group indices. + ------------------------------------------------------------------- Tue Feb 21 22:25:16 UTC 2017 - jengelh@inai.de diff --git a/libinput.spec b/libinput.spec index 5d85b01..8101610 100644 --- a/libinput.spec +++ b/libinput.spec @@ -32,6 +32,8 @@ Source: http://freedesktop.org/software/libinput/%name-%version.tar.xz Source2: http://freedesktop.org/software/libinput/%name-%version.tar.xz.sig Source3: baselibs.conf Source4: %name.keyring +# PATCH-FIX-UPSTREAM libinput-fix-crasher.patch zaitor@opensuse.org -- Fix a crash when requesting invalid mode group indices. +Patch: libinput-fix-crasher.patch #git#BuildRequires: autoconf >= 2.64 #git#BuildRequires: automake >= 1.11 #git#BuildRequires: libtool >= 2.2 @@ -98,6 +100,7 @@ to develop applications that require libinput. %prep %setup -qn %name-%version +%patch -p1 %build if [ ! -e configure ]; then From 3fd2c142aa9072a9fbf093ea3e9727345dc3dbdcb2c09dd5374c8197a4620c72 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 8 Mar 2017 09:51:19 +0000 Subject: [PATCH 2/2] Accepting request 477703 from home:Zaitor:branches:X11:Wayland New upstream release, not buildtested OBS-URL: https://build.opensuse.org/request/show/477703 OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/libinput?expand=0&rev=111 --- libinput-1.6.2.tar.xz | 3 -- libinput-1.6.2.tar.xz.sig | Bin 72 -> 0 bytes libinput-1.6.3.tar.xz | 3 ++ libinput-1.6.3.tar.xz.sig | Bin 0 -> 72 bytes libinput-fix-crasher.patch | 71 ------------------------------------- libinput.changes | 13 +++++++ libinput.spec | 5 +-- 7 files changed, 17 insertions(+), 78 deletions(-) delete mode 100644 libinput-1.6.2.tar.xz delete mode 100644 libinput-1.6.2.tar.xz.sig create mode 100644 libinput-1.6.3.tar.xz create mode 100644 libinput-1.6.3.tar.xz.sig delete mode 100644 libinput-fix-crasher.patch diff --git a/libinput-1.6.2.tar.xz b/libinput-1.6.2.tar.xz deleted file mode 100644 index 1c8eca2..0000000 --- a/libinput-1.6.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:96fc0e0b24a96042b16e561201979dfa4a3f00a642538195c62f72b79f4084fa -size 929180 diff --git a/libinput-1.6.2.tar.xz.sig b/libinput-1.6.2.tar.xz.sig deleted file mode 100644 index 68e9151104a88af33f0539d7dc44d82a95f67c8f8e021eb55f55590da1193934..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 72 zcmV-O0Jr~$Mg#y60ssaD0$8i18UP9j5aK(2aI|OezpPIHpq< -Date: Fri, 24 Feb 2017 10:10:44 +1000 -Subject: Fix a crash when requesting invalid mode group indices - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -(cherry picked from commit c787ccf270f44007dbadce72c1516b819c2ca5ce) - -diff --git a/src/evdev-tablet-pad-leds.c b/src/evdev-tablet-pad-leds.c -index 209ab73..89b3b9d 100644 ---- a/src/evdev-tablet-pad-leds.c -+++ b/src/evdev-tablet-pad-leds.c -@@ -645,5 +645,9 @@ evdev_device_tablet_pad_get_mode_group(struct evdev_device *device, - if (!(device->seat_caps & EVDEV_DEVICE_TABLET_PAD)) - return NULL; - -+ if (index >= -+ (unsigned int)evdev_device_tablet_pad_get_num_mode_groups(device)) -+ return NULL; -+ - return pad_get_mode_group(pad, index); - } --- -cgit v0.10.2 - - -From 3940ab7f40a39a045e888068d199871e6d669392 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 24 Feb 2017 10:15:23 +1000 -Subject: tools: add mode group info to libinput-list-devices - -We don't cater for the special case of groups having a different number of -modes, there is no hardware right now that does that. - -Signed-off-by: Peter Hutterer -Reviewed-by: Hans de Goede -(cherry picked from commit 38c675c9599fabeb8c530ab74898524a71cacf75) - -diff --git a/tools/libinput-list-devices.c b/tools/libinput-list-devices.c -index e202388..8fd25df 100644 ---- a/tools/libinput-list-devices.c -+++ b/tools/libinput-list-devices.c -@@ -245,16 +245,23 @@ rotation_default(struct libinput_device *device) - static void - print_pad_info(struct libinput_device *device) - { -- int nbuttons, nrings, nstrips; -+ int nbuttons, nrings, nstrips, ngroups, nmodes; -+ struct libinput_tablet_pad_mode_group *group; - - nbuttons = libinput_device_tablet_pad_get_num_buttons(device); - nrings = libinput_device_tablet_pad_get_num_rings(device); - nstrips = libinput_device_tablet_pad_get_num_strips(device); -+ ngroups = libinput_device_tablet_pad_get_num_mode_groups(device); -+ -+ group = libinput_device_tablet_pad_get_mode_group(device, 0); -+ nmodes = libinput_tablet_pad_mode_group_get_num_modes(group); - - printf("Pad:\n"); - printf(" Rings: %d\n", nrings); - printf(" Strips: %d\n", nstrips); - printf(" Buttons: %d\n", nbuttons); -+ printf(" Mode groups: %d (%d modes)\n", ngroups, nmodes); -+ - } - - static void --- -cgit v0.10.2 - diff --git a/libinput.changes b/libinput.changes index 6236cd3..227068b 100644 --- a/libinput.changes +++ b/libinput.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Mar 8 09:34:25 UTC 2017 - zaitor@opensuse.org + +- Update to version 1.6.3: + * A few small fixes that likely affect few users only: the + minimum size for horizontal edge scrolling has been reduced to + 40mm and hovering touches inside a software button area are + handled better now. Since we don't use pressure-based touches + in 1.6.x, this is unlikely to be noticed. + * Requesting an invalid mode group index doesn't crash anymore, + that's pretty much UX improvement 101. +- Drop libinput-fix-crasher.patch: Fixed upstream. + ------------------------------------------------------------------- Wed Mar 1 19:51:34 UTC 2017 - zaitor@opensuse.org diff --git a/libinput.spec b/libinput.spec index 8101610..672e2d6 100644 --- a/libinput.spec +++ b/libinput.spec @@ -18,7 +18,7 @@ Name: libinput %define lname libinput10 -Version: 1.6.2 +Version: 1.6.3 Release: 0 Summary: Input device and event processing library License: MIT @@ -32,8 +32,6 @@ Source: http://freedesktop.org/software/libinput/%name-%version.tar.xz Source2: http://freedesktop.org/software/libinput/%name-%version.tar.xz.sig Source3: baselibs.conf Source4: %name.keyring -# PATCH-FIX-UPSTREAM libinput-fix-crasher.patch zaitor@opensuse.org -- Fix a crash when requesting invalid mode group indices. -Patch: libinput-fix-crasher.patch #git#BuildRequires: autoconf >= 2.64 #git#BuildRequires: automake >= 1.11 #git#BuildRequires: libtool >= 2.2 @@ -100,7 +98,6 @@ to develop applications that require libinput. %prep %setup -qn %name-%version -%patch -p1 %build if [ ! -e configure ]; then