Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package xf86-input-libinput for 
openSUSE:Factory checked in at 2021-06-25 15:01:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xf86-input-libinput (Old)
 and      /work/SRC/openSUSE:Factory/.xf86-input-libinput.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xf86-input-libinput"

Fri Jun 25 15:01:13 2021 rev:38 rq:901597 version:1.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/xf86-input-libinput/xf86-input-libinput.changes  
2021-04-19 21:05:57.712026000 +0200
+++ 
/work/SRC/openSUSE:Factory/.xf86-input-libinput.new.2625/xf86-input-libinput.changes
        2021-06-25 15:01:56.584195865 +0200
@@ -1,0 +2,9 @@
+Wed Jun 23 23:09:49 UTC 2021 - Stefan Dirsch <[email protected]>
+
+- Update to version 1.1.0
+  * This release adds a new driver-specific option: 
+    ScrollPixelDistance. This option converts movement "pixels"
+    from libinput into the server's "scroll unit" definition and
+    can thus help speeding up or slowing down two-finger/edge scrolling.
+
+-------------------------------------------------------------------

Old:
----
  xf86-input-libinput-1.0.1.tar.bz2
  xf86-input-libinput-1.0.1.tar.bz2.sig

New:
----
  xf86-input-libinput-1.1.0.tar.bz2
  xf86-input-libinput-1.1.0.tar.bz2.sig

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

Other differences:
------------------
++++++ xf86-input-libinput.spec ++++++
--- /var/tmp/diff_new_pack.TAbqcI/_old  2021-06-25 15:01:57.016196392 +0200
+++ /var/tmp/diff_new_pack.TAbqcI/_new  2021-06-25 15:01:57.020196397 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           xf86-input-libinput
-Version:        1.0.1
+Version:        1.1.0
 Release:        0
 Summary:        Libinput driver for the Xorg X server
 License:        MIT

++++++ xf86-input-libinput-1.0.1.tar.bz2 -> xf86-input-libinput-1.1.0.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xf86-input-libinput-1.0.1/ChangeLog 
new/xf86-input-libinput-1.1.0/ChangeLog
--- old/xf86-input-libinput-1.0.1/ChangeLog     2021-04-16 04:20:17.000000000 
+0200
+++ new/xf86-input-libinput-1.1.0/ChangeLog     2021-06-24 00:32:33.000000000 
+0200
@@ -1,3 +1,53 @@
+commit 0d9184cb769d38f3cf5a92004211315e5407183d
+Author: Peter Hutterer <[email protected]>
+Date:   Thu Jun 24 08:26:19 2021 +1000
+
+    xf86-input-libinput 1.1.0
+    
+    Signed-off-by: Peter Hutterer <[email protected]>
+
+commit 9bb9e635df731eea1ad7022d1f188ace9802b353
+Author: Peter Hutterer <[email protected]>
+Date:   Tue Apr 13 16:07:24 2021 +1000
+
+    Implement a touchpad scroll distance property
+    
+    To be used for touchpads and continuous (i.e. button-based scrolling).
+    
+    libinput provides us with pixel data for finger-based and button-based
+    scrolling but the X server does support this - XI2.1 smooth scrolling is
+    merely centered around a logical scroll click (defined as "increment"), 
with
+    smooth scrolling being a fraction of that increment. For example, in the 
old
+    synaptics driver that value was in device-specific units and thus different
+    for every device.
+    
+    The increment is a constant value set in the ScrollClass and cannot be 
changed
+    at device runtime. So we simply initialize with a random default (15, 
because
+    that works well for wheels) and then scale our pixel delta in to that 
range.
+    
+    With the default value, a 15 pixel movement would result in a logical 
scroll
+    click, if the distance is set to 30 the users has to move 30 pixels to 
trigger
+    that scroll click. Pixel here being defined as the deltas that libinput
+    provides to us.
+    
+    From the client's perspective nothing changes, the increment is still the
+    same.
+    
+    Range checks are quite restrictive, this option is supposed to improve
+    usability, not as a workaround around other bugs.
+    
+    Signed-off-by: Peter Hutterer <[email protected]>
+
+commit cc10918bdc697aac76fdd8911c5a6adbd1ab61a0
+Author: Peter Hutterer <[email protected]>
+Date:   Tue Apr 27 13:44:14 2021 +1000
+
+    Fix a spacing issue
+    
+    yay for copy/paste proliferation
+    
+    Signed-off-by: Peter Hutterer <[email protected]>
+
 commit 69888cef81b3bf2339aa9f9132e4b7b83127979c
 Author: Peter Hutterer <[email protected]>
 Date:   Fri Apr 16 12:18:24 2021 +1000
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xf86-input-libinput-1.0.1/configure 
new/xf86-input-libinput-1.1.0/configure
--- old/xf86-input-libinput-1.0.1/configure     2021-04-16 04:20:13.000000000 
+0200
+++ new/xf86-input-libinput-1.1.0/configure     2021-06-24 00:32:28.000000000 
+0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for xf86-input-libinput 1.0.1.
+# Generated by GNU Autoconf 2.69 for xf86-input-libinput 1.1.0.
 #
 # Report bugs to 
<https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/issues>.
 #
@@ -591,8 +591,8 @@
 # Identity of this package.
 PACKAGE_NAME='xf86-input-libinput'
 PACKAGE_TARNAME='xf86-input-libinput'
-PACKAGE_VERSION='1.0.1'
-PACKAGE_STRING='xf86-input-libinput 1.0.1'
+PACKAGE_VERSION='1.1.0'
+PACKAGE_STRING='xf86-input-libinput 1.1.0'
 
PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/issues'
 PACKAGE_URL=''
 
@@ -1367,7 +1367,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 1.0.1 to adapt to many kinds of 
systems.
+\`configure' configures xf86-input-libinput 1.1.0 to adapt to many kinds of 
systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1439,7 +1439,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xf86-input-libinput 1.0.1:";;
+     short | recursive ) echo "Configuration of xf86-input-libinput 1.1.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1573,7 +1573,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xf86-input-libinput configure 1.0.1
+xf86-input-libinput configure 1.1.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1897,7 +1897,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 1.0.1, which was
+It was created by xf86-input-libinput $as_me 1.1.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2765,7 +2765,7 @@
 
 # Define the identity of the package.
  PACKAGE='xf86-input-libinput'
- VERSION='1.0.1'
+ VERSION='1.1.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -19109,7 +19109,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 1.0.1, which was
+This file was extended by xf86-input-libinput $as_me 1.1.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -19175,7 +19175,7 @@
 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 1.0.1
+xf86-input-libinput config.status 1.1.0
 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-1.0.1/configure.ac 
new/xf86-input-libinput-1.1.0/configure.ac
--- old/xf86-input-libinput-1.0.1/configure.ac  2021-04-16 04:20:07.000000000 
+0200
+++ new/xf86-input-libinput-1.1.0/configure.ac  2021-06-24 00:32:23.000000000 
+0200
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-libinput],
-        [1.0.1],
+        [1.1.0],
         
[https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/issues],
         [xf86-input-libinput])
 AC_CONFIG_SRCDIR([Makefile.am])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xf86-input-libinput-1.0.1/include/libinput-properties.h 
new/xf86-input-libinput-1.1.0/include/libinput-properties.h
--- old/xf86-input-libinput-1.0.1/include/libinput-properties.h 2021-04-16 
04:20:07.000000000 +0200
+++ new/xf86-input-libinput-1.1.0/include/libinput-properties.h 2021-06-24 
00:32:23.000000000 +0200
@@ -123,6 +123,12 @@
 /* Scroll button lock: BOOL, 1 value, TRUE for enabled, FALSE otherwise, 
read-only*/
 #define LIBINPUT_PROP_SCROLL_BUTTON_LOCK_DEFAULT "libinput Button Scrolling 
Button Lock Enabled Default"
 
+/* Scroll pixel distance: CARD32, 1 value (with implementation-defined limits) 
*/
+#define LIBINPUT_PROP_SCROLL_PIXEL_DISTANCE "libinput Scrolling Pixel Distance"
+
+/* Scroll pixel distance: CARD32, 1 value, read-only */
+#define LIBINPUT_PROP_SCROLL_PIXEL_DISTANCE_DEFAULT "libinput Scrolling Pixel 
Distance Default"
+
 /* Click method: BOOL read-only, 2 values in order buttonareas, clickfinger
    shows available click methods */
 #define LIBINPUT_PROP_CLICK_METHODS_AVAILABLE "libinput Click Methods 
Available"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xf86-input-libinput-1.0.1/man/libinput.man 
new/xf86-input-libinput-1.1.0/man/libinput.man
--- old/xf86-input-libinput-1.0.1/man/libinput.man      2021-04-16 
04:20:07.000000000 +0200
+++ new/xf86-input-libinput-1.1.0/man/libinput.man      2021-06-24 
00:32:23.000000000 +0200
@@ -160,6 +160,16 @@
 Not all devices support all options, if an option is unsupported, the
 default scroll option for this device is used.
 .TP 7
+.BI "Option \*qScrollPixelDistance\*q \*q" int \*q
+Sets the movement distance, in "pixels", required to trigger one logical
+wheel click. This option only applies to the scroll methods
+.BI twofinger,
+.BI edge,
+.BI button.
+See section
+.B SCROLL PIXEL DISTANCE
+for more details.
+.TP 7
 .BI "Option \*qSendEventsMode\*q \*q" 
(disabled|enabled|disabled-on-external-mouse) \*q
 Sets the send events mode to disabled, enabled, or "disable when an external
 mouse is connected".
@@ -279,6 +289,10 @@
 3 boolean values (8 bit, 0 or 1), in order "two-finger", "edge", "button".
 Indicates which scroll method is currently enabled on this device.
 .TP 7
+.BI "libinput Scroll Pixel Distance"
+1 32-bit value (nonzero, with additional implementation-defined range checks).
+Changes the movement distance required to trigger one logical wheel click.
+.TP 7
 .BI "libinput Send Events Modes Available"
 2 boolean values (8 bit, 0 or 1), in order "disabled" and
 "disabled-on-external-mouse". Indicates which send-event modes are available
@@ -396,6 +410,17 @@
 .TP
 This feature is provided by this driver, not by libinput.
 
+.SH SCROLL PIXEL DISTANCE
+The X server does not support per-pixel scrolling but it does support
+smooth scrolling. All scroll events however are based around a logical
+unit of scrolling (traditionally corresponding to a wheel click).
+It is thus not possible to scroll by 10 pixels, but it is possible for a
+driver to scroll by 1/10th of a logical wheel click.
+.PP
+libinput provides scroll data in pixels. The \fBScrollPixelDistance\fR
+option defines the amount of movement equivalent to one wheel click. For
+example, a value of 50 means the user has to move a finger by 50 pixels to
+generate one logical click event and each pixel is 1/50th of a wheel click.
 .SH BUGS
 This driver does not work with \fBOption \*qDevice\*q\fR set to an event
 node in \fI/dev/input/by-id\fR and \fI/dev/input/by-path\fR. This can be
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xf86-input-libinput-1.0.1/src/xf86libinput.c 
new/xf86-input-libinput-1.1.0/src/xf86libinput.c
--- old/xf86-input-libinput-1.0.1/src/xf86libinput.c    2021-04-16 
04:20:07.000000000 +0200
+++ new/xf86-input-libinput-1.1.0/src/xf86libinput.c    2021-06-24 
00:32:23.000000000 +0200
@@ -52,6 +52,9 @@
 #define TABLET_NUM_BUTTONS 7 /* we need scroll buttons */
 #define TOUCH_MAX_SLOTS 15
 #define XORG_KEYCODE_OFFSET 8
+#define SCROLL_INCREMENT 15
+#define TOUCHPAD_SCROLL_DIST_MIN 10 /* in libinput pixels */
+#define TOUCHPAD_SCROLL_DIST_MAX 50 /* in libinput pixels */
 
 #define streq(a, b) (strcmp(a, b) == 0)
 #define strneq(a, b, n) (strncmp(a, b, n) == 0)
@@ -146,6 +149,7 @@
                CARD32 sendevents;
                CARD32 scroll_button; /* xorg button number */
                BOOL scroll_buttonlock;
+               uint32_t scroll_pixel_distance;
                float speed;
                float matrix[9];
                enum libinput_config_scroll_method scroll_method;
@@ -1621,7 +1625,17 @@
        if (source == LIBINPUT_POINTER_AXIS_SOURCE_WHEEL) {
                value = get_wheel_scroll_value(driver_data, event, axis);
        } else {
+               double dist = driver_data->options.scroll_pixel_distance;
+               assert(dist != 0.0);
+
                value = libinput_event_pointer_get_axis_value(event, axis);
+               /* We need to scale this value into our scroll increment range
+                * because that one is constant for the lifetime of the
+                * device. The user may change the ScrollPixelDistance
+                * though, so where we have a dist of 10 but an increment of
+                * 15, we need to scale from 0..10 into 0..15.
+                */
+               value = value/dist * SCROLL_INCREMENT;
        }
 
        *value_out = value;
@@ -2826,6 +2840,39 @@
        return buttonlock;
 }
 
+static inline bool
+xf86libinput_want_scroll_distance_option(struct libinput_device *device)
+{
+       uint32_t methods =
+           LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN |
+           LIBINPUT_CONFIG_SCROLL_2FG |
+           LIBINPUT_CONFIG_SCROLL_EDGE;
+
+       if ((libinput_device_config_scroll_get_methods(device) & methods) == 0)
+               return false;
+
+       return true;
+}
+
+static inline uint32_t
+xf86libinput_parse_scroll_pixel_distance_option(InputInfoPtr pInfo,
+                                               struct libinput_device *device)
+{
+       uint32_t dflt = SCROLL_INCREMENT;
+       uint32_t dist;
+
+       if (!xf86libinput_want_scroll_distance_option(device))
+               return dflt;
+
+       dist = xf86SetIntOption(pInfo->options, "ScrollPixelDistance", dflt);
+       if (dist < TOUCHPAD_SCROLL_DIST_MIN || dist > TOUCHPAD_SCROLL_DIST_MAX) 
{
+               xf86IDrvMsg(pInfo, X_ERROR,
+                           "Invalid ScrollPixelDistance %d\n", dist);
+               dist = dflt;
+       }
+       return dist;
+}
+
 static inline unsigned int
 xf86libinput_parse_clickmethod_option(InputInfoPtr pInfo,
                                      struct libinput_device *device)
@@ -3107,6 +3154,7 @@
        options->scroll_method = xf86libinput_parse_scroll_option(pInfo, 
device);
        options->scroll_button = xf86libinput_parse_scrollbutton_option(pInfo, 
device);
        options->scroll_buttonlock = 
xf86libinput_parse_scrollbuttonlock_option(pInfo, device);
+       options->scroll_pixel_distance = 
xf86libinput_parse_scroll_pixel_distance_option(pInfo, device);
        options->click_method = xf86libinput_parse_clickmethod_option(pInfo, 
device);
        options->middle_emulation = 
xf86libinput_parse_middleemulation_option(pInfo, device);
        options->disable_while_typing = 
xf86libinput_parse_disablewhiletyping_option(pInfo, device);
@@ -3420,8 +3468,8 @@
         * affect touchpad scroll speed. For wheels it doesn't matter as
         * we're using the discrete value only.
         */
-       driver_data->scroll.v.dist = 15;
-       driver_data->scroll.h.dist = 15;
+       driver_data->scroll.v.dist = SCROLL_INCREMENT;
+       driver_data->scroll.h.dist = SCROLL_INCREMENT;
 
        if (!is_subdevice) {
                if (libinput_device_has_capability(device, 
LIBINPUT_DEVICE_CAP_POINTER))
@@ -3563,6 +3611,8 @@
 static Atom prop_scroll_button_default;
 static Atom prop_scroll_buttonlock;
 static Atom prop_scroll_buttonlock_default;
+static Atom prop_scroll_pixel_distance;
+static Atom prop_scroll_pixel_distance_default;
 static Atom prop_click_methods_available;
 static Atom prop_click_method_enabled;
 static Atom prop_click_method_default;
@@ -3684,7 +3734,7 @@
 }
 
 static inline BOOL
-xf86libinput_check_device (DeviceIntPtr dev,
+xf86libinput_check_device(DeviceIntPtr dev,
                           Atom atom)
 {
        InputInfoPtr pInfo = dev->public.devicePrivate;
@@ -3722,7 +3772,7 @@
                if (*data != 0 && *data != 1)
                        return BadValue;
 
-               if (!xf86libinput_check_device (dev, atom))
+               if (!xf86libinput_check_device(dev, atom))
                        return BadMatch;
 
                if (libinput_device_config_tap_get_finger_count(device) == 0)
@@ -3816,7 +3866,7 @@
            if ((data[0] && data[1]) || (!data[0] && !data[1]))
                return BadValue;
 
-           if (!xf86libinput_check_device (dev, atom))
+           if (!xf86libinput_check_device(dev, atom))
                return BadMatch;
        }
 
@@ -3855,7 +3905,7 @@
                    data[8] != 1.0)
                        return BadValue;
 
-               if (!xf86libinput_check_device (dev, atom))
+               if (!xf86libinput_check_device(dev, atom))
                        return BadMatch;
 
                if (!libinput_device_config_calibration_has_matrix(device))
@@ -3889,7 +3939,7 @@
                if (*data < -1.0 || *data > 1.0)
                        return BadValue;
 
-               if (!xf86libinput_check_device (dev, atom))
+               if (!xf86libinput_check_device(dev, atom))
                        return BadMatch;
 
                if (libinput_device_config_accel_is_available(device) == 0)
@@ -3929,7 +3979,7 @@
                if (__builtin_popcount(profiles) > 1)
                        return BadValue;
 
-               if (!xf86libinput_check_device (dev, atom))
+               if (!xf86libinput_check_device(dev, atom))
                        return BadMatch;
 
                supported = libinput_device_config_accel_get_profiles(device);
@@ -3962,7 +4012,7 @@
                if (*data != 0 && *data != 1)
                        return BadValue;
 
-               if (!xf86libinput_check_device (dev, atom))
+               if (!xf86libinput_check_device(dev, atom))
                        return BadMatch;
 
                if (libinput_device_config_scroll_has_natural_scroll(device) == 
0)
@@ -3999,7 +4049,7 @@
        if (checkonly) {
                uint32_t supported;
 
-               if (!xf86libinput_check_device (dev, atom))
+               if (!xf86libinput_check_device(dev, atom))
                        return BadMatch;
 
                supported = 
libinput_device_config_send_events_get_modes(device);
@@ -4033,7 +4083,7 @@
                int supported;
                int left_handed = *data;
 
-               if (!xf86libinput_check_device (dev, atom))
+               if (!xf86libinput_check_device(dev, atom))
                        return BadMatch;
 
                supported = 
libinput_device_config_left_handed_is_available(device);
@@ -4097,7 +4147,7 @@
                if (__builtin_popcount(modes) > 1)
                        return BadValue;
 
-               if (!xf86libinput_check_device (dev, atom))
+               if (!xf86libinput_check_device(dev, atom))
                        return BadMatch;
 
                supported = libinput_device_config_scroll_get_methods(device);
@@ -4130,7 +4180,7 @@
                uint32_t button = *data;
                uint32_t supported;
 
-               if (!xf86libinput_check_device (dev, atom))
+               if (!xf86libinput_check_device(dev, atom))
                        return BadMatch;
 
                supported = libinput_device_pointer_has_button(device,
@@ -4162,7 +4212,7 @@
                if (enabled != 0 && enabled != 1)
                        return BadValue;
 
-               if (!xf86libinput_check_device (dev, atom))
+               if (!xf86libinput_check_device(dev, atom))
                        return BadMatch;
        } else {
                driver_data->options.scroll_buttonlock = enabled;
@@ -4371,7 +4421,7 @@
                if (enabled != 0 && enabled != 1)
                        return BadValue;
 
-               if (!xf86libinput_check_device (dev, atom))
+               if (!xf86libinput_check_device(dev, atom))
                        return BadMatch;
        } else {
                driver_data->options.horiz_scrolling_enabled = enabled;
@@ -4381,6 +4431,34 @@
 }
 
 static inline int
+LibinputSetPropertyScrollPixelDistance(DeviceIntPtr dev,
+                                      Atom atom,
+                                      XIPropertyValuePtr val,
+                                      BOOL checkonly)
+{
+       InputInfoPtr pInfo = dev->public.devicePrivate;
+       struct xf86libinput *driver_data = pInfo->private;
+       uint32_t dist;
+
+       if (val->format != 32 || val->type != XA_CARDINAL || val->size != 1)
+               return BadMatch;
+
+       dist = *(BOOL*)val->data;
+       if (checkonly) {
+               if (dist < TOUCHPAD_SCROLL_DIST_MIN ||
+                   dist > TOUCHPAD_SCROLL_DIST_MAX)
+                       return BadValue;
+
+               if (!xf86libinput_check_device(dev, atom))
+                       return BadMatch;
+       } else {
+               driver_data->options.scroll_pixel_distance = dist;
+       }
+
+       return Success;
+}
+
+static inline int
 LibinputSetPropertyRotationAngle(DeviceIntPtr dev,
                                 Atom atom,
                                 XIPropertyValuePtr val,
@@ -4400,7 +4478,7 @@
                if (*angle < 0.0 || *angle >= 360.0)
                        return BadValue;
 
-               if (!xf86libinput_check_device (dev, atom))
+               if (!xf86libinput_check_device(dev, atom))
                        return BadMatch;
 
                if (libinput_device_config_rotation_is_available(device) == 0)
@@ -4444,7 +4522,7 @@
                                return BadValue;
                }
 
-               if (!xf86libinput_check_device (dev, atom))
+               if (!xf86libinput_check_device(dev, atom))
                        return BadMatch;
 
                if (!cubic_bezier(controls, test_bezier, 
ARRAY_SIZE(test_bezier)))
@@ -4484,7 +4562,7 @@
                    (area.x == 0 && area.y != 0))
                        return BadValue;
 
-               if (!xf86libinput_check_device (dev, atom))
+               if (!xf86libinput_check_device(dev, atom))
                        return BadMatch;
        } else {
                struct xf86libinput *other;
@@ -4557,6 +4635,8 @@
                rc = LibinputSetPropertyDragLockButtons(dev, atom, val, 
checkonly);
        else if (atom == prop_horiz_scroll)
                rc = LibinputSetPropertyHorizScroll(dev, atom, val, checkonly);
+       else if (atom == prop_scroll_pixel_distance)
+               rc = LibinputSetPropertyScrollPixelDistance(dev, atom, val, 
checkonly);
        else if (atom == prop_mode_groups) {
                InputInfoPtr pInfo = dev->public.devicePrivate;
                struct xf86libinput *driver_data = pInfo->private;
@@ -4588,6 +4668,7 @@
                 atom == prop_scroll_methods_available ||
                 atom == prop_scroll_button_default ||
                 atom == prop_scroll_buttonlock_default ||
+                atom == prop_scroll_pixel_distance_default ||
                 atom == prop_click_method_default ||
                 atom == prop_click_methods_available ||
                 atom == prop_middle_emulation_default ||
@@ -5115,6 +5196,32 @@
 }
 
 static void
+LibinputInitScrollPixelDistanceProperty(DeviceIntPtr dev,
+                                       struct xf86libinput *driver_data,
+                                       struct libinput_device *device)
+{
+       CARD32 dist = driver_data->options.scroll_pixel_distance;
+
+       if (!subdevice_has_capabilities(dev, CAP_POINTER))
+               return;
+
+       if (!xf86libinput_want_scroll_distance_option(device))
+               return;
+
+       prop_scroll_pixel_distance = LibinputMakeProperty(dev,
+                                                         
LIBINPUT_PROP_SCROLL_PIXEL_DISTANCE,
+                                                         XA_CARDINAL, 32,
+                                                         1, &dist);
+       if (!prop_scroll_pixel_distance)
+               return;
+
+       prop_scroll_pixel_distance_default = LibinputMakeProperty(dev,
+                                                                 
LIBINPUT_PROP_SCROLL_PIXEL_DISTANCE_DEFAULT,
+                                                                 XA_CARDINAL, 
32,
+                                                                 1, &dist);
+}
+
+static void
 LibinputInitClickMethodsProperty(DeviceIntPtr dev,
                                 struct xf86libinput *driver_data,
                                 struct libinput_device *device)
@@ -5555,6 +5662,7 @@
 
        LibinputInitDragLockProperty(dev, driver_data);
        LibinputInitHorizScrollProperty(dev, driver_data);
+       LibinputInitScrollPixelDistanceProperty(dev, driver_data, device);
        LibinputInitPressureCurveProperty(dev, driver_data);
        LibinputInitTabletAreaRatioProperty(dev, driver_data);
 }

Reply via email to