Hello community,

here is the log from the commit of package xf86-input-libinput for 
openSUSE:Factory checked in at 2015-04-25 09:54:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xf86-input-libinput (Old)
 and      /work/SRC/openSUSE:Factory/.xf86-input-libinput.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xf86-input-libinput"

Changes:
--------
--- /work/SRC/openSUSE:Factory/xf86-input-libinput/xf86-input-libinput.changes  
2015-04-23 08:05:18.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.xf86-input-libinput.new/xf86-input-libinput.changes 
    2015-04-25 11:26:26.000000000 +0200
@@ -1,0 +2,14 @@
+Fri Apr 24 15:20:02 UTC 2015 - sndir...@suse.com
+
+- xf86-input-libinput 0.9.0
+  * A couple of cosmetic changes but one addition of a new set of
+    properties: properties named "libinput something Default" show
+    the libinput default for a device. For example:
+        libinput Click Methods Available (284): 1, 1
+        libinput Click Method Enabled (285):    0, 1
+        libinput Click Method Enabled Default (286):    1, 0
+    This device has software buttons and clickfingers available,
+    clickfingers is currently enabled, software buttons is the
+    default for this device.
+
+-------------------------------------------------------------------

Old:
----
  xf86-input-libinput-0.8.0.tar.bz2

New:
----
  xf86-input-libinput-0.9.0.tar.bz2

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

Other differences:
------------------
++++++ xf86-input-libinput.spec ++++++
--- /var/tmp/diff_new_pack.udIBUb/_old  2015-04-25 11:26:26.000000000 +0200
+++ /var/tmp/diff_new_pack.udIBUb/_new  2015-04-25 11:26:26.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           xf86-input-libinput
-Version:        0.8.0
+Version:        0.9.0
 Release:        0
 Summary:        Libinput driver for the Xorg X server
 License:        MIT

++++++ xf86-input-libinput-0.8.0.tar.bz2 -> xf86-input-libinput-0.9.0.tar.bz2 
++++++
++++ 6997 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-input-libinput-0.8.0/ChangeLog new/xf86-input-libinput-0.9.0/ChangeLog
--- old/xf86-input-libinput-0.8.0/ChangeLog     2015-03-06 06:34:03.000000000 
+0100
+++ new/xf86-input-libinput-0.9.0/ChangeLog     2015-04-23 04:23:34.000000000 
+0200
@@ -1,3 +1,63 @@
+commit 446401bea9d0335273963f476e897d8c4916420e
+Author: Peter Hutterer <peter.hutte...@who-t.net>
+Date:   Thu Apr 23 12:20:12 2015 +1000
+
+    xf86-input-libinput 0.9.0
+    
+    Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
+
+commit 8d4e03570cbdbb53bae57452614cbe45b6eb46f8
+Author: Peter Hutterer <peter.hutte...@who-t.net>
+Date:   Mon Mar 16 09:33:17 2015 +1000
+
+    Add "libinput something Default" properties
+    
+    A client or xorg.conf setting may change the property but once changed it
+    cannot be reset by a client to the original state without knowledge about 
the
+    device.
+    
+    Export the various libinput_...get_default() functions as properties.
+    
+    https://bugs.freedesktop.org/show_bug.cgi?id=89574
+    
+    Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
+    Reviewed-by: Hans de Goede <hdego...@redhat.com>
+
+commit 0c5620a29c6f08b824457f5e6ce3c4e25c1c136e
+Author: Peter Hutterer <peter.hutte...@who-t.net>
+Date:   Mon Mar 16 09:40:36 2015 +1000
+
+    Add a helper function for making properties
+    
+    Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
+    Reviewed-by: Hans de Goede <hdego...@redhat.com>
+
+commit fb50cef7002392eb16537fe8f0cdffbc2ab03a7a
+Author: Peter Hutterer <peter.hutte...@who-t.net>
+Date:   Wed Mar 18 09:10:38 2015 +1000
+
+    man: update the property list in the man page
+    
+    Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
+
+commit 64a0f870e02f99f2204cc5568c3eea4d8a16e80d
+Author: Peter Hutterer <peter.hutte...@who-t.net>
+Date:   Wed Mar 18 08:58:59 2015 +1000
+
+    Fix a couple of -Wformat warnings
+    
+    unsigned int vs int
+    
+    Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
+
+commit e362e4dc4c7662902c3e467d9ef9686bf63acbbd
+Author: Peter Hutterer <peter.hutte...@who-t.net>
+Date:   Mon Mar 16 10:35:37 2015 +1000
+
+    cosmetic: drop duplicate empty lines
+    
+    Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
+
 commit 7b3b04b5186abf9b3ebb7bc9db1c0bf10635d84c
 Author: Peter Hutterer <peter.hutte...@who-t.net>
 Date:   Fri Mar 6 15:32:58 2015 +1000
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-input-libinput-0.8.0/configure.ac 
new/xf86-input-libinput-0.9.0/configure.ac
--- old/xf86-input-libinput-0.8.0/configure.ac  2015-03-06 06:32:55.000000000 
+0100
+++ new/xf86-input-libinput-0.9.0/configure.ac  2015-04-23 04:17:29.000000000 
+0200
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-libinput],
-        [0.8.0],
+        [0.9.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-libinput])
 AC_CONFIG_SRCDIR([Makefile.am])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-input-libinput-0.8.0/include/libinput-properties.h 
new/xf86-input-libinput-0.9.0/include/libinput-properties.h
--- old/xf86-input-libinput-0.8.0/include/libinput-properties.h 2015-02-26 
08:04:11.000000000 +0100
+++ new/xf86-input-libinput-0.9.0/include/libinput-properties.h 2015-03-18 
00:15:40.000000000 +0100
@@ -27,15 +27,27 @@
 /* Tapping enabled/disabled: BOOL, 1 value */
 #define LIBINPUT_PROP_TAP "libinput Tapping Enabled"
 
+/* Tapping default enabled/disabled: BOOL, 1 value, read-only */
+#define LIBINPUT_PROP_TAP_DEFAULT "libinput Tapping Enabled Default"
+
 /* Calibration matrix: FLOAT, 9 values of a 3x3 matrix, in rows */
 #define LIBINPUT_PROP_CALIBRATION "libinput Calibration Matrix"
 
+/* Calibration matrix: FLOAT, 9 values of a 3x3 matrix, in rows, read-only*/
+#define LIBINPUT_PROP_CALIBRATION_DEFAULT "libinput Calibration Matrix Default"
+
 /* Pointer accel speed: FLOAT, 1 value, 32 bit */
 #define LIBINPUT_PROP_ACCEL "libinput Accel Speed"
 
+/* Pointer accel speed: FLOAT, 1 value, 32 bit, read-only*/
+#define LIBINPUT_PROP_ACCEL_DEFAULT "libinput Accel Speed Default"
+
 /* Natural scrolling: BOOL, 1 value */
 #define LIBINPUT_PROP_NATURAL_SCROLL "libinput Natural Scrolling Enabled"
 
+/* Natural scrolling: BOOL, 1 value, read-only */
+#define LIBINPUT_PROP_NATURAL_SCROLL_DEFAULT "libinput Natural Scrolling 
Enabled Default"
+
 /* Send-events mode: BOOL read-only, 2 values in order disabled,
    disabled-on-external-mouse */
 #define LIBINPUT_PROP_SENDEVENTS_AVAILABLE "libinput Send Events Modes 
Available"
@@ -44,9 +56,16 @@
    disabled-on-external-mouse */
 #define LIBINPUT_PROP_SENDEVENTS_ENABLED "libinput Send Events Mode Enabled"
 
+/* Send-events mode: BOOL, 2 values in order disabled,
+   disabled-on-external-mouse, read-only */
+#define LIBINPUT_PROP_SENDEVENTS_ENABLED_DEFAULT "libinput Send Events Mode 
Enabled Default"
+
 /* Left-handed enabled/disabled: BOOL, 1 value */
 #define LIBINPUT_PROP_LEFT_HANDED "libinput Left Handed Enabled"
 
+/* Left-handed enabled/disabled: BOOL, 1 value, read-only */
+#define LIBINPUT_PROP_LEFT_HANDED_DEFAULT "libinput Left Handed Enabled 
Default"
+
 /* Scroll method: BOOL read-only, 3 values in order 2fg, edge, button.
    shows available scroll methods */
 #define LIBINPUT_PROP_SCROLL_METHODS_AVAILABLE "libinput Scroll Methods 
Available"
@@ -55,9 +74,16 @@
    only one is enabled at a time at max */
 #define LIBINPUT_PROP_SCROLL_METHOD_ENABLED "libinput Scroll Method Enabled"
 
+/* Scroll method: BOOL, 3 values in order 2fg, edge, button
+   only one is enabled at a time at max, read-only */
+#define LIBINPUT_PROP_SCROLL_METHOD_ENABLED_DEFAULT "libinput Scroll Method 
Enabled Default"
+
 /* Scroll button for button scrolling: 32-bit int, 1 value */
 #define LIBINPUT_PROP_SCROLL_BUTTON "libinput Button Scrolling Button"
 
+/* Scroll button for button scrolling: 32-bit int, 1 value, read-only */
+#define LIBINPUT_PROP_SCROLL_BUTTON_DEFAULT "libinput Button Scrolling Button 
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"
@@ -66,4 +92,7 @@
    only one enabled at a time at max */
 #define LIBINPUT_PROP_CLICK_METHOD_ENABLED "libinput Click Method Enabled"
 
+/* Click method: BOOL, 2 values in order buttonareas, clickfinger
+   only one enabled at a time at max, read-only */
+#define LIBINPUT_PROP_CLICK_METHOD_ENABLED_DEFAULT "libinput Click Method 
Enabled Default"
 #endif /* _LIBINPUT_PROPERTIES_H_ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-input-libinput-0.8.0/man/libinput.man 
new/xf86-input-libinput-0.9.0/man/libinput.man
--- old/xf86-input-libinput-0.8.0/man/libinput.man      2015-02-26 
07:56:25.000000000 +0100
+++ new/xf86-input-libinput-0.9.0/man/libinput.man      2015-03-18 
00:15:40.000000000 +0100
@@ -96,7 +96,11 @@
 libinput. On configuration failure, the default value is applied.
 
 .SH SUPPORTED PROPERTIES
-The following properties are provided by the
+.B libinput
+exports runtime-configurable options as properties. If a property listed
+below is not available, the matching configuration option is not available
+on the device. This however does not imply that the feature is not available
+on the device. The following properties are provided by the
 .B libinput
 driver.
 .TP 7
@@ -113,9 +117,44 @@
 .BI "libinput Natural Scrolling Enabled"
 1 boolean value (8 bit, 0 or 1). 1 enables natural scrolling
 .TP 7
-.BI "libinput Send Events Mode"
-1 32-bit value, defines the sendevent mode. See the libinput documentation
-for the allowed values.
+.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
+on this device.
+.TP 7
+.BI "libinput Send Events Mode Enabled"
+2 boolean values (8 bit, 0 or 1), in order "disabled" and
+"disabled-on-external-mouse". Indicates which send-event modes is currently
+enabled on this device.
+.TP 7
+.BI "libinput Left Handed Enabled"
+1 boolean value (8 bit, 0 or 1). Indicates if left-handed mode is enabled or
+disabled.
+.TP 7
+.BI "libinput Scroll Methods Available"
+3 boolean values (8 bit, 0 or 1), in order "two-finger", "edge", "button".
+Indicates which scroll methods are available on this device.
+.TP 7
+.BI "libinput Scroll Method Enabled"
+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 Button Scrolling Button"
+1 32-bit value. Sets the button number to use for button scrolling. This
+setting is independent of the scroll method, to enable button scrolling the
+method must be set to button-scrolling and a valid button must be set.
+.TP 7
+.BI "libinput Click Methods Available"
+2 boolean values (8 bit, 0 or 1), in order "buttonareas", "clickfinger".
+Indicates which click methods are available on this device.
+.TP 7
+.BI "libinput Click Methods Enabled"
+2 boolean values (8 bit, 0 or 1), in order "buttonareas", "clickfinger".
+Indicates which click methods are enabled on this device.
+.PP
+The above properties have a
+.BI "libinput <property name> Default"
+equivalent that indicates the default value for this setting on this device.
 
 .SH AUTHORS
 Peter Hutterer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-input-libinput-0.8.0/src/libinput.c 
new/xf86-input-libinput-0.9.0/src/libinput.c
--- old/xf86-input-libinput-0.8.0/src/libinput.c        2015-03-06 
05:50:38.000000000 +0100
+++ new/xf86-input-libinput-0.9.0/src/libinput.c        2015-04-13 
01:01:18.000000000 +0200
@@ -225,7 +225,7 @@
            libinput_device_config_send_events_set_mode(device,
                                                        
driver_data->options.sendevents) != LIBINPUT_CONFIG_STATUS_SUCCESS)
                xf86IDrvMsg(pInfo, X_ERROR,
-                           "Failed to set SendEventsMode %d\n",
+                           "Failed to set SendEventsMode %u\n",
                            driver_data->options.sendevents);
 
        if (libinput_device_config_scroll_has_natural_scroll(device) &&
@@ -289,7 +289,7 @@
                scroll_button = 
btn_xorg2linux(driver_data->options.scroll_button);
                if (libinput_device_config_scroll_set_button(device, 
scroll_button) != LIBINPUT_CONFIG_STATUS_SUCCESS)
                        xf86IDrvMsg(pInfo, X_ERROR,
-                                   "Failed to set ScrollButton to %d\n",
+                                   "Failed to set ScrollButton to %u\n",
                                    driver_data->options.scroll_button);
        }
 
@@ -1041,7 +1041,7 @@
                if (libinput_device_config_send_events_set_mode(device, mode) !=
                    LIBINPUT_CONFIG_STATUS_SUCCESS) {
                        xf86IDrvMsg(pInfo, X_ERROR,
-                                   "Failed to set SendEventsMode %d\n", mode);
+                                   "Failed to set SendEventsMode %u\n", mode);
                        mode = 
libinput_device_config_send_events_get_mode(device);
                }
                driver_data->options.sendevents = mode;
@@ -1135,7 +1135,7 @@
                if (libinput_device_config_scroll_set_button(device,
                                                             b) != 
LIBINPUT_CONFIG_STATUS_SUCCESS) {
                        xf86IDrvMsg(pInfo, X_ERROR,
-                                   "Failed to set ScrollButton to %d\n",
+                                   "Failed to set ScrollButton to %u\n",
                                    scroll_button);
                        scroll_button = 
btn_linux2xorg(libinput_device_config_scroll_get_button(device));
                }
@@ -1327,17 +1327,26 @@
 
 /* libinput-specific properties */
 static Atom prop_tap;
+static Atom prop_tap_default;
 static Atom prop_calibration;
+static Atom prop_calibration_default;
 static Atom prop_accel;
+static Atom prop_accel_default;
 static Atom prop_natural_scroll;
+static Atom prop_natural_scroll_default;
 static Atom prop_sendevents_available;
 static Atom prop_sendevents_enabled;
+static Atom prop_sendevents_default;
 static Atom prop_left_handed;
+static Atom prop_left_handed_default;
 static Atom prop_scroll_methods_available;
 static Atom prop_scroll_method_enabled;
+static Atom prop_scroll_method_default;
 static Atom prop_scroll_button;
+static Atom prop_scroll_button_default;
 static Atom prop_click_methods_available;
 static Atom prop_click_method_enabled;
+static Atom prop_click_method_default;
 
 /* general properties */
 static Atom prop_float;
@@ -1355,7 +1364,7 @@
        if (device == NULL) {
                BUG_WARN(dev->public.on);
                xf86IDrvMsg(pInfo, X_INFO,
-                           "SetProperty on %d called but device is disabled.\n"
+                           "SetProperty on %u called but device is disabled.\n"
                            "This driver cannot change properties on a disabled 
device\n",
                            atom);
                return FALSE;
@@ -1685,7 +1694,6 @@
        return Success;
 }
 
-
 static int
 LibinputSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
                  BOOL checkonly)
@@ -1717,7 +1725,16 @@
                return BadAccess; /* read-only */
        else if (atom == prop_click_method_enabled)
                rc = LibinputSetPropertyClickMethod(dev, atom, val, checkonly);
-       else if (atom == prop_device || atom == prop_product_id)
+       else if (atom == prop_device || atom == prop_product_id ||
+                atom == prop_tap_default ||
+                atom == prop_calibration_default ||
+                atom == prop_accel_default ||
+                atom == prop_natural_scroll_default ||
+                atom == prop_sendevents_default ||
+                atom == prop_left_handed_default ||
+                atom == prop_scroll_method_default ||
+                atom == prop_scroll_button_default ||
+                atom == prop_click_method_default)
                return BadAccess; /* read-only */
        else
                return Success;
@@ -1728,23 +1745,52 @@
        return rc;
 }
 
+static Atom
+LibinputMakeProperty(DeviceIntPtr dev,
+                    const char *prop_name,
+                    Atom type,
+                    int format,
+                    int len,
+                    void *data)
+{
+       int rc;
+       Atom prop = MakeAtom(prop_name, strlen(prop_name), TRUE);
+
+       rc = XIChangeDeviceProperty(dev, prop, type, format,
+                                   PropModeReplace,
+                                   len, data, FALSE);
+       if (rc != Success)
+               return None;
+
+       XISetDevicePropertyDeletable(dev, prop, FALSE);
+
+       return prop;
+}
+
 static void
 LibinputInitTapProperty(DeviceIntPtr dev,
                        struct xf86libinput *driver_data,
                        struct libinput_device *device)
 {
        BOOL tap = driver_data->options.tapping;
-       int rc;
 
        if (libinput_device_config_tap_get_finger_count(device) == 0)
                return;
 
-       prop_tap = MakeAtom(LIBINPUT_PROP_TAP, strlen(LIBINPUT_PROP_TAP), TRUE);
-       rc = XIChangeDeviceProperty(dev, prop_tap, XA_INTEGER, 8,
-                                   PropModeReplace, 1, &tap, FALSE);
-       if (rc != Success)
+       prop_tap = LibinputMakeProperty(dev,
+                                       LIBINPUT_PROP_TAP,
+                                       XA_INTEGER,
+                                       8,
+                                       1,
+                                       &tap);
+       if (!prop_tap)
                return;
-       XISetDevicePropertyDeletable(dev, prop_tap, FALSE);
+
+       tap = libinput_device_config_tap_get_default_enabled(device);
+       prop_tap_default = LibinputMakeProperty(dev,
+                                               LIBINPUT_PROP_TAP_DEFAULT,
+                                               XA_INTEGER, 8,
+                                               1, &tap);
 }
 
 static void
@@ -1753,7 +1799,6 @@
                                struct libinput_device *device)
 {
        float calibration[9];
-       int rc;
 
        if (!libinput_device_config_calibration_has_matrix(device))
                return;
@@ -1766,15 +1811,20 @@
        calibration[7] = 0;
        calibration[8] = 1;
 
-       prop_calibration = MakeAtom(LIBINPUT_PROP_CALIBRATION,
-                                   strlen(LIBINPUT_PROP_CALIBRATION),
-                                   TRUE);
-
-       rc = XIChangeDeviceProperty(dev, prop_calibration, prop_float, 32,
-                                   PropModeReplace, 9, calibration, FALSE);
-       if (rc != Success)
+       prop_calibration = LibinputMakeProperty(dev,
+                                               LIBINPUT_PROP_CALIBRATION,
+                                               prop_float, 32,
+                                               9, calibration);
+       if (!prop_calibration)
                return;
-       XISetDevicePropertyDeletable(dev, prop_calibration, FALSE);
+
+       libinput_device_config_calibration_get_default_matrix(device,
+                                                             calibration);
+
+       prop_calibration_default = LibinputMakeProperty(dev,
+                                                       
LIBINPUT_PROP_CALIBRATION_DEFAULT,
+                                                       prop_float, 32,
+                                                       9, calibration);
 }
 
 static void
@@ -1783,17 +1833,22 @@
                          struct libinput_device *device)
 {
        float speed = driver_data->options.speed;
-       int rc;
 
        if (!libinput_device_config_accel_is_available(device))
                return;
 
-       prop_accel = MakeAtom(LIBINPUT_PROP_ACCEL, strlen(LIBINPUT_PROP_ACCEL), 
TRUE);
-       rc = XIChangeDeviceProperty(dev, prop_accel, prop_float, 32,
-                                   PropModeReplace, 1, &speed, FALSE);
-       if (rc != Success)
+       prop_accel = LibinputMakeProperty(dev,
+                                         LIBINPUT_PROP_ACCEL,
+                                         prop_float, 32,
+                                         1, &speed);
+       if (!prop_accel)
                return;
-       XISetDevicePropertyDeletable(dev, prop_accel, FALSE);
+
+       speed = libinput_device_config_accel_get_default_speed(device);
+       prop_accel_default = LibinputMakeProperty(dev,
+                                                 LIBINPUT_PROP_ACCEL_DEFAULT,
+                                                 prop_float, 32,
+                                                 1, &speed);
 }
 
 static void
@@ -1802,19 +1857,22 @@
                                  struct libinput_device *device)
 {
        BOOL natural_scroll = driver_data->options.natural_scrolling;
-       int rc;
 
        if (!libinput_device_config_scroll_has_natural_scroll(device))
                return;
 
-       prop_natural_scroll = MakeAtom(LIBINPUT_PROP_NATURAL_SCROLL,
-                                      strlen(LIBINPUT_PROP_NATURAL_SCROLL),
-                                      TRUE);
-       rc = XIChangeDeviceProperty(dev, prop_natural_scroll, XA_INTEGER, 8,
-                                   PropModeReplace, 1, &natural_scroll, FALSE);
-       if (rc != Success)
+       prop_natural_scroll = LibinputMakeProperty(dev,
+                                                  LIBINPUT_PROP_NATURAL_SCROLL,
+                                                  XA_INTEGER, 8,
+                                                  1, &natural_scroll);
+       if (!prop_natural_scroll)
                return;
-       XISetDevicePropertyDeletable(dev, prop_natural_scroll, FALSE);
+
+       natural_scroll = 
libinput_device_config_scroll_get_default_natural_scroll_enabled(device);
+       prop_natural_scroll_default = LibinputMakeProperty(dev,
+                                                          
LIBINPUT_PROP_NATURAL_SCROLL_DEFAULT,
+                                                          XA_INTEGER, 8,
+                                                          1, &natural_scroll);
 }
 
 static void
@@ -1825,7 +1883,6 @@
        uint32_t sendevent_modes;
        uint32_t sendevents;
        BOOL modes[2] = {FALSE};
-       int rc;
 
        sendevent_modes = libinput_device_config_send_events_get_modes(device);
        if (sendevent_modes == LIBINPUT_CONFIG_SEND_EVENTS_ENABLED)
@@ -1836,15 +1893,12 @@
        if (sendevent_modes & 
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE)
                modes[1] = TRUE;
 
-       prop_sendevents_available = MakeAtom(LIBINPUT_PROP_SENDEVENTS_AVAILABLE,
-                                            
strlen(LIBINPUT_PROP_SENDEVENTS_AVAILABLE),
-                                            TRUE);
-       rc = XIChangeDeviceProperty(dev, prop_sendevents_available,
-                                   XA_INTEGER, 8,
-                                   PropModeReplace, 2, modes, FALSE);
-       if (rc != Success)
+       prop_sendevents_available = LibinputMakeProperty(dev,
+                                                        
LIBINPUT_PROP_SENDEVENTS_AVAILABLE,
+                                                        XA_INTEGER, 8,
+                                                        2, modes);
+       if (!prop_sendevents_available)
                return;
-       XISetDevicePropertyDeletable(dev, prop_sendevents_available, FALSE);
 
        memset(modes, 0, sizeof(modes));
        sendevents = driver_data->options.sendevents;
@@ -1858,15 +1912,25 @@
                break;
        }
 
-       prop_sendevents_enabled = MakeAtom(LIBINPUT_PROP_SENDEVENTS_ENABLED,
-                                          
strlen(LIBINPUT_PROP_SENDEVENTS_ENABLED),
-                                          TRUE);
-       rc = XIChangeDeviceProperty(dev, prop_sendevents_enabled,
-                                   XA_INTEGER, 8,
-                                   PropModeReplace, 2, modes, FALSE);
-       if (rc != Success)
+       prop_sendevents_enabled = LibinputMakeProperty(dev,
+                                                      
LIBINPUT_PROP_SENDEVENTS_ENABLED,
+                                                      XA_INTEGER, 8,
+                                                      2, modes);
+
+       if (!prop_sendevents_enabled)
                return;
-       XISetDevicePropertyDeletable(dev, prop_sendevents_enabled, FALSE);
+
+       memset(modes, 0, sizeof(modes));
+       sendevent_modes = 
libinput_device_config_send_events_get_default_mode(device);
+       if (sendevent_modes & LIBINPUT_CONFIG_SEND_EVENTS_DISABLED)
+               modes[0] = TRUE;
+       if (sendevent_modes & 
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE)
+               modes[1] = TRUE;
+
+       prop_sendevents_default = LibinputMakeProperty(dev,
+                                                      
LIBINPUT_PROP_SENDEVENTS_ENABLED_DEFAULT,
+                                                      XA_INTEGER, 8,
+                                                      2, modes);
 }
 
 static void
@@ -1875,20 +1939,22 @@
                               struct libinput_device *device)
 {
        BOOL left_handed = driver_data->options.left_handed;
-       int rc;
 
        if (!libinput_device_config_left_handed_is_available(device))
                return;
 
-       prop_left_handed = MakeAtom(LIBINPUT_PROP_LEFT_HANDED,
-                                   strlen(LIBINPUT_PROP_LEFT_HANDED),
-                                   TRUE);
-       rc = XIChangeDeviceProperty(dev, prop_left_handed,
-                                   XA_INTEGER, 8,
-                                   PropModeReplace, 1, &left_handed, FALSE);
-       if (rc != Success)
+       prop_left_handed = LibinputMakeProperty(dev,
+                                               LIBINPUT_PROP_LEFT_HANDED,
+                                               XA_INTEGER, 8,
+                                               1, &left_handed);
+       if (!prop_left_handed)
                return;
-       XISetDevicePropertyDeletable(dev, prop_left_handed, FALSE);
+
+       left_handed = libinput_device_config_left_handed_get_default(device);
+       prop_left_handed_default = LibinputMakeProperty(dev,
+                                                       
LIBINPUT_PROP_LEFT_HANDED_DEFAULT,
+                                                       XA_INTEGER, 8,
+                                                       1, &left_handed);
 }
 
 static void
@@ -1899,7 +1965,6 @@
        uint32_t scroll_methods;
        enum libinput_config_scroll_method method;
        BOOL methods[3] = {FALSE};
-       int rc;
 
        scroll_methods = libinput_device_config_scroll_get_methods(device);
        if (scroll_methods == LIBINPUT_CONFIG_SCROLL_NO_SCROLL)
@@ -1912,21 +1977,13 @@
        if (scroll_methods & LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN)
                methods[2] = TRUE;
 
-       prop_scroll_methods_available =
-               MakeAtom(LIBINPUT_PROP_SCROLL_METHODS_AVAILABLE,
-                        strlen(LIBINPUT_PROP_SCROLL_METHODS_AVAILABLE),
-                        TRUE);
-       rc = XIChangeDeviceProperty(dev,
-                                   prop_scroll_methods_available,
-                                   XA_INTEGER, 8,
-                                   PropModeReplace,
-                                   ARRAY_SIZE(methods),
-                                   &methods, FALSE);
-       if (rc != Success)
+       prop_scroll_methods_available = LibinputMakeProperty(dev,
+                                                            
LIBINPUT_PROP_SCROLL_METHODS_AVAILABLE,
+                                                            XA_INTEGER, 8,
+                                                            
ARRAY_SIZE(methods),
+                                                            &methods);
+       if (!prop_scroll_methods_available)
                return;
-       XISetDevicePropertyDeletable(dev,
-                                    prop_scroll_methods_available,
-                                    FALSE);
 
        memset(methods, 0, sizeof(methods));
 
@@ -1945,38 +2002,47 @@
                break;
        }
 
-       prop_scroll_method_enabled =
-               MakeAtom(LIBINPUT_PROP_SCROLL_METHOD_ENABLED,
-                        strlen(LIBINPUT_PROP_SCROLL_METHOD_ENABLED),
-                        TRUE);
-       rc = XIChangeDeviceProperty(dev,
-                                   prop_scroll_method_enabled,
-                                   XA_INTEGER, 8,
-                                   PropModeReplace,
-                                   ARRAY_SIZE(methods),
-                                   &methods, FALSE);
-       if (rc != Success)
+       prop_scroll_method_enabled = LibinputMakeProperty(dev,
+                                                         
LIBINPUT_PROP_SCROLL_METHOD_ENABLED,
+                                                         XA_INTEGER, 8,
+                                                         ARRAY_SIZE(methods),
+                                                         &methods);
+       if (!prop_scroll_method_enabled)
+               return;
+
+       scroll_methods = 
libinput_device_config_scroll_get_default_method(device);
+       if (scroll_methods == LIBINPUT_CONFIG_SCROLL_NO_SCROLL)
                return;
 
-       XISetDevicePropertyDeletable(dev,
-                                    prop_scroll_method_enabled,
-                                    FALSE);
+       if (scroll_methods & LIBINPUT_CONFIG_SCROLL_2FG)
+               methods[0] = TRUE;
+       if (scroll_methods & LIBINPUT_CONFIG_SCROLL_EDGE)
+               methods[1] = TRUE;
+       if (scroll_methods & LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN)
+               methods[2] = TRUE;
 
+       prop_scroll_method_default = LibinputMakeProperty(dev,
+                                                         
LIBINPUT_PROP_SCROLL_METHOD_ENABLED_DEFAULT,
+                                                         XA_INTEGER, 8,
+                                                         ARRAY_SIZE(methods),
+                                                         &methods);
        /* Scroll button */
        if (libinput_device_config_scroll_get_methods(device) &
            LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN) {
                CARD32 scroll_button = driver_data->options.scroll_button;
 
-               prop_scroll_button = MakeAtom(LIBINPUT_PROP_SCROLL_BUTTON,
-                                           strlen(LIBINPUT_PROP_SCROLL_BUTTON),
-                                           TRUE);
-               rc = XIChangeDeviceProperty(dev, prop_scroll_button,
-                                           XA_CARDINAL, 32,
-                                           PropModeReplace, 1,
-                                           &scroll_button, FALSE);
-               if (rc != Success)
+               prop_scroll_button = LibinputMakeProperty(dev,
+                                                         
LIBINPUT_PROP_SCROLL_BUTTON,
+                                                         XA_CARDINAL, 32,
+                                                         1, &scroll_button);
+               if (!prop_scroll_button)
                        return;
-               XISetDevicePropertyDeletable(dev, prop_scroll_button, FALSE);
+
+               scroll_button = 
libinput_device_config_scroll_get_default_button(device);
+               prop_scroll_button_default = LibinputMakeProperty(dev,
+                                                                 
LIBINPUT_PROP_SCROLL_BUTTON_DEFAULT,
+                                                                 XA_CARDINAL, 
32,
+                                                                 1, 
&scroll_button);
        }
 }
 
@@ -1988,7 +2054,6 @@
        uint32_t click_methods;
        enum libinput_config_click_method method;
        BOOL methods[2] = {FALSE};
-       int rc;
 
        click_methods = libinput_device_config_click_get_methods(device);
        if (click_methods == LIBINPUT_CONFIG_CLICK_METHOD_NONE)
@@ -1999,21 +2064,13 @@
        if (click_methods & LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER)
                methods[1] = TRUE;
 
-       prop_click_methods_available =
-               MakeAtom(LIBINPUT_PROP_CLICK_METHODS_AVAILABLE,
-                        strlen(LIBINPUT_PROP_CLICK_METHODS_AVAILABLE),
-                        TRUE);
-       rc = XIChangeDeviceProperty(dev,
-                                   prop_click_methods_available,
-                                   XA_INTEGER, 8,
-                                   PropModeReplace,
-                                   ARRAY_SIZE(methods),
-                                   &methods, FALSE);
-       if (rc != Success)
+       prop_click_methods_available = LibinputMakeProperty(dev,
+                                                           
LIBINPUT_PROP_CLICK_METHODS_AVAILABLE,
+                                                           XA_INTEGER, 8,
+                                                           ARRAY_SIZE(methods),
+                                                           &methods);
+       if (!prop_click_methods_available)
                return;
-       XISetDevicePropertyDeletable(dev,
-                                    prop_click_methods_available,
-                                    FALSE);
 
        memset(methods, 0, sizeof(methods));
 
@@ -2029,22 +2086,34 @@
                break;
        }
 
-       prop_click_method_enabled =
-               MakeAtom(LIBINPUT_PROP_CLICK_METHOD_ENABLED,
-                        strlen(LIBINPUT_PROP_CLICK_METHOD_ENABLED),
-                        TRUE);
-       rc = XIChangeDeviceProperty(dev,
-                                   prop_click_method_enabled,
-                                   XA_INTEGER, 8,
-                                   PropModeReplace,
-                                   ARRAY_SIZE(methods),
-                                   &methods, FALSE);
-       if (rc != Success)
+       prop_click_method_enabled = LibinputMakeProperty(dev,
+                                                        
LIBINPUT_PROP_CLICK_METHOD_ENABLED,
+                                                        XA_INTEGER, 8,
+                                                        ARRAY_SIZE(methods),
+                                                        &methods);
+
+       if (!prop_click_method_enabled)
                return;
 
-       XISetDevicePropertyDeletable(dev,
-                                    prop_click_method_enabled,
-                                    FALSE);
+       memset(methods, 0, sizeof(methods));
+
+       method = libinput_device_config_click_get_default_method(device);
+       switch(method) {
+       case LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS:
+               methods[0] = TRUE;
+               break;
+       case LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER:
+               methods[1] = TRUE;
+               break;
+       default:
+               break;
+       }
+
+       prop_click_method_default = LibinputMakeProperty(dev,
+                                                        
LIBINPUT_PROP_CLICK_METHOD_ENABLED_DEFAULT,
+                                                        XA_INTEGER, 8,
+                                                        ARRAY_SIZE(methods),
+                                                        &methods);
 }
 
 static void


Reply via email to