Hello community,
here is the log from the commit of package xf86-input-libinput for
openSUSE:Factory checked in at 2019-02-08 13:46:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xf86-input-libinput (Old)
and /work/SRC/openSUSE:Factory/.xf86-input-libinput.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xf86-input-libinput"
Fri Feb 8 13:46:27 2019 rev:31 rq:671818 version:0.28.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/xf86-input-libinput/xf86-input-libinput.changes
2018-10-25 08:11:40.396214297 +0200
+++
/work/SRC/openSUSE:Factory/.xf86-input-libinput.new.28833/xf86-input-libinput.changes
2019-02-08 13:46:29.102815031 +0100
@@ -1,0 +2,10 @@
+Mon Feb 4 17:43:06 UTC 2019 - [email protected]
+
+- Update to version 0.28.2
+ * This release contains a bugfix that will likely trigger in future releases
+ of libinput. The driver assumed wrongly that any wheel event has a nonzero
+ discrete event and used the discrete as a divisor. Which is obviously a bad
+ idea, mathematically speaking, because you never know what the future will
+ bring. Hint: it will bring wheel events with a discrete of zero.
+
+-------------------------------------------------------------------
Old:
----
xf86-input-libinput-0.28.1.tar.bz2
xf86-input-libinput-0.28.1.tar.bz2.sig
New:
----
xf86-input-libinput-0.28.2.tar.bz2
xf86-input-libinput-0.28.2.tar.bz2.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xf86-input-libinput.spec ++++++
--- /var/tmp/diff_new_pack.UuQ8yp/_old 2019-02-08 13:46:29.578814884 +0100
+++ /var/tmp/diff_new_pack.UuQ8yp/_new 2019-02-08 13:46:29.582814882 +0100
@@ -1,7 +1,7 @@
#
# spec file for package xf86-input-libinput
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: xf86-input-libinput
-Version: 0.28.1
+Version: 0.28.2
Release: 0
Summary: Libinput driver for the Xorg X server
License: MIT
++++++ xf86-input-libinput-0.28.1.tar.bz2 -> xf86-input-libinput-0.28.2.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-input-libinput-0.28.1/ChangeLog
new/xf86-input-libinput-0.28.2/ChangeLog
--- old/xf86-input-libinput-0.28.1/ChangeLog 2018-10-15 01:37:54.000000000
+0200
+++ new/xf86-input-libinput-0.28.2/ChangeLog 2019-02-04 04:18:01.000000000
+0100
@@ -1,3 +1,91 @@
+commit 5a925eaa84b31c5857969342802018cb5803475a
+Author: Peter Hutterer <[email protected]>
+Date: Mon Feb 4 13:14:11 2019 +1000
+
+ xf86-input-libinput 0.28.2
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
+commit e7eafa199e9e60c15014a9d72d14efcbbf8e44ca
+Author: Peter Hutterer <[email protected]>
+Date: Mon Jan 21 15:21:45 2019 +1000
+
+ Handle scroll wheel events with a discrete of 0
+
+ The driver currently assumes that any wheel event has a non-zero discrete
+ value of 1. This is incorrect, it just hasn't triggered yet with any
device.
+
+ With the hi-res scroll patches in place in the kernel and libinput, we may
get
+ wheel events with a discrete value of 0. We assume that if this ever
happens,
+ the device has some sensible click angle set so all we need to do is ignore
+ the discrete 0 events and wait for the first discrete event to come.
+
+ Also add an explanatory comment too to make it clear the calculation is
only
+ done once.
+
+ Fixes #19
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
+commit d13ab268bdf6eb589022c58ddc87c1211b49ac4c
+Author: Peter Hutterer <[email protected]>
+Date: Mon Jan 21 13:19:11 2019 +1000
+
+ Return the wheel scroll value instead of just the fraction
+
+ This is prep work for the hi-res work but right now, no real functional
+ changes. It does however fix a bug where we used the vertial scroll dist
for
+ the horizontal wheel as well.
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
+commit 347c78387eb3fbadcd582f0ea51bb083962a728f
+Author: Peter Hutterer <[email protected]>
+Date: Mon Jan 21 13:05:23 2019 +1000
+
+ Split the scroll axis details up for easier extension
+
+ If we need more per-axis fields, it's easier to add this way.
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
+commit b63f7994dc4359900dbb2a29612e0112b6ae5b79
+Author: Peter Hutterer <[email protected]>
+Date: Mon Jan 7 16:26:47 2019 +1000
+
+ conf: add an example snippet for how to assign options
+
+ Users still like to copy the whole file, potentially messing things up.
+ Let's put a warning into the file directly that this is less than ideal.
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
+commit 04f42d6e0f99d771cbbab25c896f287fd6697f37
+Author: Alan Coopersmith <[email protected]>
+Date: Sun Nov 25 12:47:32 2018 -0800
+
+ Update configure.ac bug URL for gitlab migration
+
+ Signed-off-by: Alan Coopersmith <[email protected]>
+
+commit 5d341d1d6c389b286279f87d7a3bdb0f5bd275f1
+Author: Alan Coopersmith <[email protected]>
+Date: Sun Nov 18 11:48:07 2018 -0800
+
+ Update README for gitlab migration
+
+ Signed-off-by: Alan Coopersmith <[email protected]>
+
+commit 4985de5ef3e81d32d694c3d4a480a6311b6f1416
+Author: Peter Hutterer <[email protected]>
+Date: Mon Oct 15 15:29:37 2018 +1000
+
+ Remove two dead assignments
+
+ Value stored but never read.
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
commit e26fc3c66c04eb3d3164e6a9e7c983154fb00856
Author: Peter Hutterer <[email protected]>
Date: Mon Oct 15 09:36:36 2018 +1000
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-input-libinput-0.28.1/README.md
new/xf86-input-libinput-0.28.2/README.md
--- old/xf86-input-libinput-0.28.1/README.md 2018-10-15 01:37:44.000000000
+0200
+++ new/xf86-input-libinput-0.28.2/README.md 2019-02-04 04:17:52.000000000
+0100
@@ -2,7 +2,7 @@
===============================================
The official repository for this driver is
-http://cgit.freedesktop.org/xorg/driver/xf86-input-libinput/
+https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput
This is an X driver based on libinput. It is a thin wrapper around libinput,
so while it does provide all features that libinput supports it does little
@@ -20,10 +20,10 @@
distribution for libinput-devel or similar).
To get libinput from source, see:
-http://www.freedesktop.org/wiki/Software/libinput/
+https://www.freedesktop.org/wiki/Software/libinput/
To build the X server from source:
-http://www.x.org/wiki/Building_the_X_Window_System/
+https://www.x.org/wiki/Building_the_X_Window_System/
Building
--------
@@ -48,8 +48,8 @@
Bugs
----
-Bugs in libinput go to the "libinput" component of wayland:
-https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland
+Bugs in libinput go to the Issues section of the libinput gitlab project:
+https://gitlab.freedesktop.org/libinput/libinput/issues
-Bugs in this driver go to the "Input/libinput" component of xorg:
-https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+Bugs in this driver go to the Issues section of its gitlab project:
+https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/issues
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-input-libinput-0.28.1/conf/40-libinput.conf
new/xf86-input-libinput-0.28.2/conf/40-libinput.conf
--- old/xf86-input-libinput-0.28.1/conf/40-libinput.conf 2018-10-15
01:37:44.000000000 +0200
+++ new/xf86-input-libinput-0.28.2/conf/40-libinput.conf 2019-02-04
04:17:52.000000000 +0100
@@ -1,4 +1,21 @@
# Match on all types of devices but joysticks
+#
+# If you want to configure your devices, do not copy this file.
+# Instead, use a config snippet that contains something like this:
+#
+# Section "InputClass"
+# Identifier "something or other"
+# MatchDriver "libinput"
+#
+# MatchIsTouchpad "on"
+# ... other Match directives ...
+# Option "someoption" "value"
+# EndSection
+#
+# This applies the option any libinput device also matched by the other
+# directives. See the xorg.conf(5) man page for more info on
+# matching devices.
+
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-input-libinput-0.28.1/configure
new/xf86-input-libinput-0.28.2/configure
--- old/xf86-input-libinput-0.28.1/configure 2018-10-15 01:37:49.000000000
+0200
+++ new/xf86-input-libinput-0.28.2/configure 2019-02-04 04:17:57.000000000
+0100
@@ -1,8 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for xf86-input-libinput 0.28.1.
+# Generated by GNU Autoconf 2.69 for xf86-input-libinput 0.28.2.
#
-# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+# Report bugs to
<https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/issues>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -275,7 +275,7 @@
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
$as_echo "$0: Please tell [email protected] and
-$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+$0: https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/issues
$0: about your system, including any error possibly output
$0: before this message. Then install a modern shell, or
$0: manually run the script under such a shell if you do
@@ -591,9 +591,9 @@
# Identity of this package.
PACKAGE_NAME='xf86-input-libinput'
PACKAGE_TARNAME='xf86-input-libinput'
-PACKAGE_VERSION='0.28.1'
-PACKAGE_STRING='xf86-input-libinput 0.28.1'
-PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+PACKAGE_VERSION='0.28.2'
+PACKAGE_STRING='xf86-input-libinput 0.28.2'
+PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/issues'
PACKAGE_URL=''
ac_unique_file="Makefile.am"
@@ -1356,7 +1356,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures xf86-input-libinput 0.28.1 to adapt to many kinds of
systems.
+\`configure' configures xf86-input-libinput 0.28.2 to adapt to many kinds of
systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1427,7 +1427,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xf86-input-libinput 0.28.1:";;
+ short | recursive ) echo "Configuration of xf86-input-libinput 0.28.2:";;
esac
cat <<\_ACEOF
@@ -1498,7 +1498,7 @@
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+Report bugs to
<https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/issues>.
_ACEOF
ac_status=$?
fi
@@ -1561,7 +1561,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xf86-input-libinput configure 0.28.1
+xf86-input-libinput configure 0.28.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1885,7 +1885,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xf86-input-libinput $as_me 0.28.1, which was
+It was created by xf86-input-libinput $as_me 0.28.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2753,7 +2753,7 @@
# Define the identity of the package.
PACKAGE='xf86-input-libinput'
- VERSION='0.28.1'
+ VERSION='0.28.2'
cat >>confdefs.h <<_ACEOF
@@ -19096,7 +19096,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by xf86-input-libinput $as_me 0.28.1, which was
+This file was extended by xf86-input-libinput $as_me 0.28.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -19156,13 +19156,13 @@
Configuration commands:
$config_commands
-Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>."
+Report bugs to
<https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/issues>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //;
s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-xf86-input-libinput config.status 0.28.1
+xf86-input-libinput config.status 0.28.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-input-libinput-0.28.1/configure.ac
new/xf86-input-libinput-0.28.2/configure.ac
--- old/xf86-input-libinput-0.28.1/configure.ac 2018-10-15 01:37:44.000000000
+0200
+++ new/xf86-input-libinput-0.28.2/configure.ac 2019-02-04 04:17:52.000000000
+0100
@@ -23,8 +23,8 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-input-libinput],
- [0.28.1],
- [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+ [0.28.2],
+
[https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/issues],
[xf86-input-libinput])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-input-libinput-0.28.1/src/xf86libinput.c
new/xf86-input-libinput-0.28.2/src/xf86libinput.c
--- old/xf86-input-libinput-0.28.1/src/xf86libinput.c 2018-10-15
01:37:44.000000000 +0200
+++ new/xf86-input-libinput-0.28.2/src/xf86libinput.c 2019-02-04
04:17:52.000000000 +0100
@@ -128,11 +128,10 @@
uint32_t capabilities;
struct {
- int vdist;
- int hdist;
-
- double vdist_fraction;
- double hdist_fraction;
+ struct scroll_axis {
+ int dist;
+ double fraction;
+ } v, h;
} scroll;
struct {
@@ -398,7 +397,7 @@
libinput_device_set_user_data(device, NULL);
libinput_path_remove_device(device);
- device = libinput_device_unref(device);
+ libinput_device_unref(device);
shared_device->device = NULL;
}
@@ -936,8 +935,8 @@
XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y),
min, max, res * 1000, 0, res * 1000,
Relative);
- SetScrollValuator(dev, 2, SCROLL_TYPE_HORIZONTAL,
driver_data->scroll.hdist, 0);
- SetScrollValuator(dev, 3, SCROLL_TYPE_VERTICAL,
driver_data->scroll.vdist, 0);
+ SetScrollValuator(dev, 2, SCROLL_TYPE_HORIZONTAL,
driver_data->scroll.h.dist, 0);
+ SetScrollValuator(dev, 3, SCROLL_TYPE_VERTICAL,
driver_data->scroll.v.dist, 0);
return Success;
}
@@ -984,8 +983,8 @@
XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y),
min, max, res * 1000, 0, res * 1000,
Absolute);
- SetScrollValuator(dev, 2, SCROLL_TYPE_HORIZONTAL,
driver_data->scroll.hdist, 0);
- SetScrollValuator(dev, 3, SCROLL_TYPE_VERTICAL,
driver_data->scroll.vdist, 0);
+ SetScrollValuator(dev, 2, SCROLL_TYPE_HORIZONTAL,
driver_data->scroll.h.dist, 0);
+ SetScrollValuator(dev, 3, SCROLL_TYPE_VERTICAL,
driver_data->scroll.v.dist, 0);
driver_data->has_abs = TRUE;
@@ -1565,40 +1564,58 @@
* e.g. a 2 degree click angle requires 8 clicks before a legacy event is
* sent, but each of those clicks will send XI2.1 smooth scroll data for
* compatible clients.
+ *
+ * Starting with kernel v5.0 we should get REL_WHEEL_HI_RES from those
+ * devices for the fine-grained scrolling and REL_WHEEL for the normal one,
+ * so the use-case above shouldn't matter anymore.
*/
static inline double
-get_scroll_fraction(struct xf86libinput *driver_data,
- struct libinput_event_pointer *event,
- enum libinput_pointer_axis axis)
+get_wheel_scroll_value(struct xf86libinput *driver_data,
+ struct libinput_event_pointer *event,
+ enum libinput_pointer_axis axis)
{
- double *fraction;
+ struct scroll_axis *s;
double f;
double angle;
int discrete;
switch (axis) {
case LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL:
- fraction = &driver_data->scroll.hdist_fraction;
+ s = &driver_data->scroll.h;
break;
case LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL:
- fraction = &driver_data->scroll.vdist_fraction;
+ s = &driver_data->scroll.v;
break;
default:
return 0.0;
}
- if (*fraction != 0.0)
- return *fraction;
-
- /* Calculate the angle per single scroll event */
angle = libinput_event_pointer_get_axis_value(event, axis);
discrete = libinput_event_pointer_get_axis_value_discrete(event, axis);
+
+ /* We only need to guess the fraction on the first set of
+ * scroll events until a discrete value arrives. Once known, we
+ * re-use the fraction until the device goes away.
+ */
+ if (s->fraction != 0.0)
+ goto out;
+
+ /* if we get a discrete of 0, assume REL_WHEEL_HI_RES exists and
+ * normal scroll events are sent correctly, so skip all the
+ * guesswork.
+ */
+ if (discrete == 0) {
+ s->fraction = 1.0;
+ goto out;
+ }
+
+ /* Calculate the angle per single scroll event */
angle /= discrete;
/* We only do magic for click angles smaller than 10 degrees */
if (angle >= 10) {
- *fraction = 1.0;
- return 1.0;
+ s->fraction = 1.0;
+ goto out;
}
/* Figure out something that gets close to 15 degrees (the general
@@ -1609,9 +1626,10 @@
*/
f = round(15.0/angle);
- *fraction = f;
+ s->fraction = f;
- return f;
+out:
+ return s->dist/s->fraction * discrete;
}
static inline bool
@@ -1628,11 +1646,7 @@
source = libinput_event_pointer_get_axis_source(event);
if (source == LIBINPUT_POINTER_AXIS_SOURCE_WHEEL) {
- double scroll_fraction;
-
- value = libinput_event_pointer_get_axis_value_discrete(event,
axis);
- scroll_fraction = get_scroll_fraction(driver_data, event, axis);
- value *= driver_data->scroll.vdist/scroll_fraction;
+ value = get_wheel_scroll_value(driver_data, event, axis);
} else {
value = libinput_event_pointer_get_axis_value(event, axis);
}
@@ -3401,8 +3415,8 @@
* affect touchpad scroll speed. For wheels it doesn't matter as
* we're using the discrete value only.
*/
- driver_data->scroll.vdist = 15;
- driver_data->scroll.hdist = 15;
+ driver_data->scroll.v.dist = 15;
+ driver_data->scroll.h.dist = 15;
if (!is_subdevice) {
if (libinput_device_has_capability(device,
LIBINPUT_DEVICE_CAP_POINTER))
@@ -3624,13 +3638,13 @@
groups[idx] = mode;
driver_data->allow_mode_group_updates = true;
- rc = XIChangeDeviceProperty(pInfo->dev,
- prop_mode_groups,
- XA_INTEGER, 8,
- PropModeReplace,
- val->size,
- groups,
- TRUE);
+ XIChangeDeviceProperty(pInfo->dev,
+ prop_mode_groups,
+ XA_INTEGER, 8,
+ PropModeReplace,
+ val->size,
+ groups,
+ TRUE);
driver_data->allow_mode_group_updates = false;
out: