[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-input-libinput: Changes to 'upstream-unstable'



 configure.ac                  |    4 
 include/libinput-properties.h |   12 ++
 man/libinput.man              |   23 ++++
 src/libinput.c                |  200 +++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 234 insertions(+), 5 deletions(-)

New commits:
commit 4b2bed6912d79f0104770d7956f14b4448c8b0ed
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Aug 4 17:08:22 2015 +1000

    xf86-input-libinput 0.13.0
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 1ee6665..c149a1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-libinput],
-        [0.12.0],
+        [0.13.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-libinput])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 223be9f62bc614c4bfa2836c5b0aaded70cadf9c
Author: Stephen Chandler Paul <cpaul@redhat.com>
Date:   Sun Aug 2 14:18:10 2015 -0400

    Add a property for Disable While Typing
    
    Signed-off-by: Stephen Chandler Paul <cpaul@redhat.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index e7de887..1ee6665 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,7 +45,7 @@ XORG_DEFAULT_OPTIONS
 
 # Obtain compiler/linker options from server and required extensions
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto [inputproto >= 2.2])
-PKG_CHECK_MODULES(LIBINPUT, [libinput >= 0.20.0])
+PKG_CHECK_MODULES(LIBINPUT, [libinput >= 0.21.0])
 
 # Define a configure option for an alternate input module directory
 AC_ARG_WITH(xorg-module-dir,
diff --git a/include/libinput-properties.h b/include/libinput-properties.h
index 6135dc8..f54cee7 100644
--- a/include/libinput-properties.h
+++ b/include/libinput-properties.h
@@ -108,4 +108,10 @@
 /* Middle button emulation: BOOL, 1 value, read-only */
 #define LIBINPUT_PROP_MIDDLE_EMULATION_ENABLED_DEFAULT "libinput Middle Emulation Enabled Default"
 
+/* Disable while typing: BOOL, 1 value */
+#define LIBINPUT_PROP_DISABLE_WHILE_TYPING "libinput Disable While Typing Enabled"
+
+/* Disable while typing: BOOL, 1 value, read-only */
+#define LIBINPUT_PROP_DISABLE_WHILE_TYPING_DEFAULT "libinput Disable While Typing Enabled Default"
+
 #endif /* _LIBINPUT_PROPERTIES_H_ */
diff --git a/man/libinput.man b/man/libinput.man
index 0ce5e6d..ac546e6 100644
--- a/man/libinput.man
+++ b/man/libinput.man
@@ -119,6 +119,10 @@ Enables or disables drag lock during tapping behavior. When enabled, a
 finger up during tap-and-drag will not immediately release the button. If
 the finger is set down again within the timeout, the draging process
 continues.
+.TP 7
+.BI "Option \*qDisableWhileTyping\*q \*q" bool \*q
+Indicates if the touchpad should be disabled while typing on the keyboard
+(this does not apply to modifier keys such as Ctrl or Alt).
 .PP
 For all options, the options are only parsed if the device supports that
 configuration option. For all options, the default value is the one used by
@@ -187,6 +191,10 @@ Indicates which click methods are enabled on this device.
 .BI "libinput Middle Emulation Enabled"
 1 boolean value (8 bit, 0 or 1). Indicates if middle emulation is enabled or
 disabled.
+.TP 7
+.BI "libinput Disable While Typing Enabled"
+1 boolean value (8 bit, 0 or 1). Indicates if disable while typing is
+enabled or disabled.
 .TP7
 .PP
 The above properties have a
diff --git a/src/libinput.c b/src/libinput.c
index c03777a..49f73c9 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -102,6 +102,7 @@ struct xf86libinput {
 		BOOL natural_scrolling;
 		BOOL left_handed;
 		BOOL middle_emulation;
+		BOOL disable_while_typing;
 		CARD32 sendevents;
 		CARD32 scroll_button; /* xorg button number */
 		float speed;
@@ -338,6 +339,13 @@ LibinputApplyConfig(DeviceIntPtr dev)
 		xf86IDrvMsg(pInfo, X_ERROR,
 			    "Failed to set MiddleEmulation to %d\n",
 			    driver_data->options.middle_emulation);
+
+	if (libinput_device_config_dwt_is_available(device) &&
+	    libinput_device_config_dwt_set_enabled(device,
+						   driver_data->options.disable_while_typing) != LIBINPUT_CONFIG_STATUS_SUCCESS)
+		xf86IDrvMsg(pInfo, X_ERROR,
+			    "Failed to set DisableWhileTyping to %d\n",
+			    driver_data->options.disable_while_typing);
 }
 
 static int
@@ -1337,6 +1345,29 @@ xf86libinput_parse_middleemulation_option(InputInfoPtr pInfo,
 	return enabled;
 }
 
+static inline BOOL
+xf86libinput_parse_disablewhiletyping_option(InputInfoPtr pInfo,
+					     struct libinput_device *device)
+{
+	BOOL enabled;
+
+	if (!libinput_device_config_dwt_is_available(device))
+		return FALSE;
+
+	enabled = xf86SetBoolOption(pInfo->options,
+				    "DisableWhileTyping",
+				    libinput_device_config_dwt_get_default_enabled(device));
+	if (libinput_device_config_dwt_set_enabled(device, enabled) !=
+	    LIBINPUT_CONFIG_STATUS_SUCCESS) {
+		xf86IDrvMsg(pInfo, X_ERROR,
+			    "Failed to set DisableWhileTyping to %d\n",
+			    enabled);
+		enabled = libinput_device_config_dwt_get_enabled(device);
+	}
+
+	return enabled;
+}
+
 static void
 xf86libinput_parse_buttonmap_option(InputInfoPtr pInfo,
 				    unsigned char *btnmap,
@@ -1390,6 +1421,7 @@ xf86libinput_parse_options(InputInfoPtr pInfo,
 	options->scroll_button = xf86libinput_parse_scrollbutton_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);
 	xf86libinput_parse_calibration_option(pInfo, device, driver_data->options.matrix);
 
 	/* non-libinput options */
@@ -1586,6 +1618,8 @@ static Atom prop_click_method_enabled;
 static Atom prop_click_method_default;
 static Atom prop_middle_emulation;
 static Atom prop_middle_emulation_default;
+static Atom prop_disable_while_typing;
+static Atom prop_disable_while_typing_default;
 
 /* general properties */
 static Atom prop_float;
@@ -1995,6 +2029,37 @@ LibinputSetPropertyMiddleEmulation(DeviceIntPtr dev,
 	return Success;
 }
 
+static inline int
+LibinputSetPropertyDisableWhileTyping(DeviceIntPtr dev,
+				      Atom atom,
+				      XIPropertyValuePtr val,
+				      BOOL checkonly)
+{
+	InputInfoPtr pInfo = dev->public.devicePrivate;
+	struct xf86libinput *driver_data = pInfo->private;
+	struct libinput_device *device = driver_data->device;
+	BOOL* data;
+
+	if (val->format != 8 || val->size != 1 || val->type != XA_INTEGER)
+		return BadMatch;
+
+	data = (BOOL*)val->data;
+	if (checkonly) {
+		if (*data != 0 && *data != 1)
+			return BadValue;
+
+		if (!xf86libinput_check_device(dev, atom))
+			return BadMatch;
+
+		if (!libinput_device_config_dwt_is_available(device))
+			return BadMatch;
+	} else {
+		driver_data->options.disable_while_typing = *data;
+	}
+
+	return Success;
+}
+
 static int
 LibinputSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
                  BOOL checkonly)
@@ -2030,6 +2095,8 @@ LibinputSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
 		rc = LibinputSetPropertyClickMethod(dev, atom, val, checkonly);
 	else if (atom == prop_middle_emulation)
 		rc = LibinputSetPropertyMiddleEmulation(dev, atom, val, checkonly);
+	else if (atom == prop_disable_while_typing)
+		rc = LibinputSetPropertyDisableWhileTyping(dev, atom, val, checkonly);
 	else if (atom == prop_device || atom == prop_product_id ||
 		 atom == prop_tap_default ||
 		 atom == prop_tap_drag_lock_default ||
@@ -2041,7 +2108,8 @@ LibinputSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
 		 atom == prop_scroll_method_default ||
 		 atom == prop_scroll_button_default ||
 		 atom == prop_click_method_default ||
-		 atom == prop_middle_emulation_default)
+		 atom == prop_middle_emulation_default ||
+		 atom == prop_disable_while_typing_default)
 		return BadAccess; /* read-only */
 	else
 		return Success;
@@ -2471,6 +2539,32 @@ LibinputInitMiddleEmulationProperty(DeviceIntPtr dev,
 }
 
 static void
+LibinputInitDisableWhileTypingProperty(DeviceIntPtr dev,
+				       struct xf86libinput *driver_data,
+				       struct libinput_device *device)
+{
+	BOOL dwt = driver_data->options.disable_while_typing;
+
+	if (!libinput_device_config_dwt_is_available(device))
+		return;
+
+	prop_disable_while_typing = LibinputMakeProperty(dev,
+							 LIBINPUT_PROP_DISABLE_WHILE_TYPING,
+							 XA_INTEGER,
+							 8,
+							 1,
+							 &dwt);
+	if (!prop_disable_while_typing)
+		return;
+
+	dwt = libinput_device_config_dwt_get_default_enabled(device);
+	prop_disable_while_typing_default = LibinputMakeProperty(dev,
+								 LIBINPUT_PROP_DISABLE_WHILE_TYPING_DEFAULT,
+								 XA_INTEGER, 8,
+								 1, &dwt);
+}
+
+static void
 LibinputInitProperty(DeviceIntPtr dev)
 {
 	InputInfoPtr pInfo  = dev->public.devicePrivate;
@@ -2492,6 +2586,7 @@ LibinputInitProperty(DeviceIntPtr dev)
 	LibinputInitScrollMethodsProperty(dev, driver_data, device);
 	LibinputInitClickMethodsProperty(dev, driver_data, device);
 	LibinputInitMiddleEmulationProperty(dev, driver_data, device);
+	LibinputInitDisableWhileTypingProperty(dev, driver_data, device);
 
 	/* Device node property, read-only  */
 	device_node = driver_data->path;

commit d3ee745a2461c09c86916f2ecf97426b6145ee09
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jul 21 11:21:47 2015 +1000

    man: minor man page improvements
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/man/libinput.man b/man/libinput.man
index f781c59..0ce5e6d 100644
--- a/man/libinput.man
+++ b/man/libinput.man
@@ -44,6 +44,9 @@ are supported:
 .BI "Option \*qDevice\*q \*q" string \*q
 Specifies the device through which the device can be accessed.  This will 
 generally be of the form \*q/dev/input/eventX\*q, where X is some integer.
+When using
+.B InputClass
+directives, this option is set by the server.
 The mapping from device node to hardware is system-dependent. Property:
 "Device Node" (read-only).
 .TP 7
@@ -64,7 +67,8 @@ default mapping. See section
 for more details.
 .TP 7
 .BI "Option \*qCalibrationMatrix\*q \*q" string \*q
-A string of 9 space-separated floating point numbers.
+A string of 9 space-separated floating point numbers, in the order
+\*qa b c d e f g h i\*q.
 Sets the calibration matrix to the 3x3 matrix where the first row is (abc),
 the second row is (def) and the third row is (ghi).
 .TP 7

commit b550b70a002e0f1645a3ac6bc80d367bd72b4b7a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jul 21 11:16:06 2015 +1000

    Fix compiler warnings about touchpad gestures
    
    We don't do anything with them though.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 2d1f874..e7de887 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,7 +45,7 @@ XORG_DEFAULT_OPTIONS
 
 # Obtain compiler/linker options from server and required extensions
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto [inputproto >= 2.2])
-PKG_CHECK_MODULES(LIBINPUT, [libinput >= 0.19.0])
+PKG_CHECK_MODULES(LIBINPUT, [libinput >= 0.20.0])
 
 # Define a configure option for an alternate input module directory
 AC_ARG_WITH(xorg-module-dir,
diff --git a/src/libinput.c b/src/libinput.c
index 0733d35..c03777a 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -924,6 +924,13 @@ xf86libinput_handle_event(struct libinput_event *event)
 						  libinput_event_get_touch_event(event),
 						  libinput_event_get_type(event));
 			break;
+		case LIBINPUT_EVENT_GESTURE_SWIPE_BEGIN:
+		case LIBINPUT_EVENT_GESTURE_SWIPE_UPDATE:
+		case LIBINPUT_EVENT_GESTURE_SWIPE_END:
+		case LIBINPUT_EVENT_GESTURE_PINCH_BEGIN:
+		case LIBINPUT_EVENT_GESTURE_PINCH_UPDATE:
+		case LIBINPUT_EVENT_GESTURE_PINCH_END:
+			break;
 	}
 }
 

commit 254b1f27a07f2372aa0c70674e8be5a02d068feb
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jul 14 16:18:38 2015 +1000

    xf86-input-libinput 0.12.0
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 5faaa36..2d1f874 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-libinput],
-        [0.11.0],
+        [0.12.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-libinput])
 AC_CONFIG_SRCDIR([Makefile.am])

commit bfedf7dbac7e92479629713c3f5622e4f19de1f4
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Jul 8 10:31:30 2015 +1000

    Add a property for tap drag lock
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/configure.ac b/configure.ac
index e477ffd..5faaa36 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,7 +45,7 @@ XORG_DEFAULT_OPTIONS
 
 # Obtain compiler/linker options from server and required extensions
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto [inputproto >= 2.2])
-PKG_CHECK_MODULES(LIBINPUT, [libinput >= 0.14.0])
+PKG_CHECK_MODULES(LIBINPUT, [libinput >= 0.19.0])
 
 # Define a configure option for an alternate input module directory
 AC_ARG_WITH(xorg-module-dir,
diff --git a/include/libinput-properties.h b/include/libinput-properties.h
index 6760b50..6135dc8 100644
--- a/include/libinput-properties.h
+++ b/include/libinput-properties.h
@@ -30,6 +30,12 @@
 /* Tapping default enabled/disabled: BOOL, 1 value, read-only */
 #define LIBINPUT_PROP_TAP_DEFAULT "libinput Tapping Enabled Default"
 
+/* Tap drag lock enabled/disabled: BOOL, 1 value */
+#define LIBINPUT_PROP_TAP_DRAG_LOCK "libinput Tapping Drag Lock Enabled"
+
+/* Tap drag lock default enabled/disabled: BOOL, 1 value */
+#define LIBINPUT_PROP_TAP_DRAG_LOCK_DEFAULT "libinput Tapping Drag Lock Enabled Default"
+
 /* Calibration matrix: FLOAT, 9 values of a 3x3 matrix, in rows */
 #define LIBINPUT_PROP_CALIBRATION "libinput Calibration Matrix"
 
diff --git a/man/libinput.man b/man/libinput.man
index df202a9..f781c59 100644
--- a/man/libinput.man
+++ b/man/libinput.man
@@ -109,6 +109,12 @@ mouse is connected".
 .TP 7
 .BI "Option \*qTapping\*q \*q" bool \*q
 Enables or disables tap-to-click behavior.
+.TP 7
+.BI "Option \*qTappingDragLock\*q \*q" bool \*q
+Enables or disables drag lock during tapping behavior. When enabled, a
+finger up during tap-and-drag will not immediately release the button. If
+the finger is set down again within the timeout, the draging process
+continues.
 .PP
 For all options, the options are only parsed if the device supports that
 configuration option. For all options, the default value is the one used by
@@ -126,6 +132,9 @@ driver.
 .BI "libinput Tapping Enabled"
 1 boolean value (8 bit, 0 or 1). 1 enables tapping
 .TP 7
+.BI "libinput Tapping Drag Lock Enabled"
+1 boolean value (8 bit, 0 or 1). 1 enables drag lock during tapping
+.TP 7
 .BI "libinput Calibration Matrix"
 9 32-bit float values, representing a 3x3 calibration matrix, order is row
 1, row 2, row 3
diff --git a/src/libinput.c b/src/libinput.c
index a06e44f..0733d35 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -98,6 +98,7 @@ struct xf86libinput {
 
 	struct options {
 		BOOL tapping;
+		BOOL tap_drag_lock;
 		BOOL natural_scrolling;
 		BOOL left_handed;
 		BOOL middle_emulation;
@@ -262,6 +263,13 @@ LibinputApplyConfig(DeviceIntPtr dev)
 			    "Failed to set Tapping to %d\n",
 			    driver_data->options.tapping);
 
+	if (libinput_device_config_tap_get_finger_count(device) > 0 &&
+	    libinput_device_config_tap_set_drag_lock_enabled(device,
+							     driver_data->options.tap_drag_lock) != LIBINPUT_CONFIG_STATUS_SUCCESS)
+		xf86IDrvMsg(pInfo, X_ERROR,
+			    "Failed to set Tapping DragLock to %d\n",
+			    driver_data->options.tap_drag_lock);
+
 	if (libinput_device_config_calibration_has_matrix(device) &&
 	    libinput_device_config_calibration_set_matrix(device,
 							  driver_data->options.matrix) != LIBINPUT_CONFIG_STATUS_SUCCESS)
@@ -1032,6 +1040,30 @@ xf86libinput_parse_tap_option(InputInfoPtr pInfo,
 	return tap;
 }
 
+static inline BOOL
+xf86libinput_parse_tap_drag_lock_option(InputInfoPtr pInfo,
+					struct libinput_device *device)
+{
+	BOOL drag_lock;
+
+	if (libinput_device_config_tap_get_finger_count(device) == 0)
+		return FALSE;
+
+	drag_lock = xf86SetBoolOption(pInfo->options,
+				      "TappingDragLock",
+				      libinput_device_config_tap_get_drag_lock_enabled(device));
+
+	if (libinput_device_config_tap_set_drag_lock_enabled(device, drag_lock) !=
+	    LIBINPUT_CONFIG_STATUS_SUCCESS) {
+		xf86IDrvMsg(pInfo, X_ERROR,
+			    "Failed to set Tapping Drag Lock to %d\n",
+			    drag_lock);
+		drag_lock = libinput_device_config_tap_get_drag_lock_enabled(device);
+	}
+
+	return drag_lock;
+}
+
 static inline double
 xf86libinput_parse_accel_option(InputInfoPtr pInfo,
 				struct libinput_device *device)
@@ -1342,6 +1374,7 @@ xf86libinput_parse_options(InputInfoPtr pInfo,
 
 	/* libinput options */
 	options->tapping = xf86libinput_parse_tap_option(pInfo, device);
+	options->tap_drag_lock = xf86libinput_parse_tap_drag_lock_option(pInfo, device);
 	options->speed = xf86libinput_parse_accel_option(pInfo, device);
 	options->natural_scrolling = xf86libinput_parse_natscroll_option(pInfo, device);
 	options->sendevents = xf86libinput_parse_sendevents_option(pInfo, device);
@@ -1523,6 +1556,8 @@ _X_EXPORT XF86ModuleData libinputModuleData = {
 /* libinput-specific properties */
 static Atom prop_tap;
 static Atom prop_tap_default;
+static Atom prop_tap_drag_lock;
+static Atom prop_tap_drag_lock_default;
 static Atom prop_calibration;
 static Atom prop_calibration_default;
 static Atom prop_accel;
@@ -1602,6 +1637,37 @@ LibinputSetPropertyTap(DeviceIntPtr dev,
 }
 
 static inline int
+LibinputSetPropertyTapDragLock(DeviceIntPtr dev,
+			       Atom atom,
+			       XIPropertyValuePtr val,
+			       BOOL checkonly)
+{
+	InputInfoPtr pInfo = dev->public.devicePrivate;
+	struct xf86libinput *driver_data = pInfo->private;
+	struct libinput_device *device = driver_data->device;
+	BOOL* data;
+
+	if (val->format != 8 || val->size != 1 || val->type != XA_INTEGER)
+		return BadMatch;
+
+	data = (BOOL*)val->data;
+	if (checkonly) {
+		if (*data != 0 && *data != 1)
+			return BadValue;
+
+		if (!xf86libinput_check_device(dev, atom))
+			return BadMatch;
+
+		if (libinput_device_config_tap_get_finger_count(device) == 0)
+			return BadMatch;
+	} else {
+		driver_data->options.tap_drag_lock = *data;
+	}
+
+	return Success;
+}
+
+static inline int
 LibinputSetPropertyCalibration(DeviceIntPtr dev,
                                Atom atom,
                                XIPropertyValuePtr val,
@@ -1930,6 +1996,8 @@ LibinputSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
 
 	if (atom == prop_tap)
 		rc = LibinputSetPropertyTap(dev, atom, val, checkonly);
+	else if (atom == prop_tap_drag_lock)
+		rc = LibinputSetPropertyTapDragLock(dev, atom, val, checkonly);
 	else if (atom == prop_calibration)
 		rc = LibinputSetPropertyCalibration(dev, atom, val,
 						    checkonly);
@@ -1957,6 +2025,7 @@ LibinputSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
 		rc = LibinputSetPropertyMiddleEmulation(dev, atom, val, checkonly);
 	else if (atom == prop_device || atom == prop_product_id ||
 		 atom == prop_tap_default ||
+		 atom == prop_tap_drag_lock_default ||
 		 atom == prop_calibration_default ||
 		 atom == prop_accel_default ||
 		 atom == prop_natural_scroll_default ||
@@ -2025,6 +2094,30 @@ LibinputInitTapProperty(DeviceIntPtr dev,
 }
 
 static void
+LibinputInitTapDragLockProperty(DeviceIntPtr dev,
+				struct xf86libinput *driver_data,
+				struct libinput_device *device)
+{
+	BOOL drag_lock = driver_data->options.tap_drag_lock;
+
+	if (libinput_device_config_tap_get_finger_count(device) == 0)
+		return;
+
+	prop_tap_drag_lock = LibinputMakeProperty(dev,
+						  LIBINPUT_PROP_TAP_DRAG_LOCK,
+						  XA_INTEGER, 8,
+						  1, &drag_lock);
+	if (!prop_tap_drag_lock)
+		return;
+
+	drag_lock = libinput_device_config_tap_get_default_enabled(device);
+	prop_tap_drag_lock_default = LibinputMakeProperty(dev,
+							  LIBINPUT_PROP_TAP_DRAG_LOCK_DEFAULT,
+							  XA_INTEGER, 8,
+							  1, &drag_lock);
+}
+
+static void
 LibinputInitCalibrationProperty(DeviceIntPtr dev,
 				struct xf86libinput *driver_data,
 				struct libinput_device *device)
@@ -2383,6 +2476,7 @@ LibinputInitProperty(DeviceIntPtr dev)
 	prop_float = XIGetKnownProperty("FLOAT");
 
 	LibinputInitTapProperty(dev, driver_data, device);
+	LibinputInitTapDragLockProperty(dev, driver_data, device);
 	LibinputInitCalibrationProperty(dev, driver_data, device);
 	LibinputInitAccelProperty(dev, driver_data, device);
 	LibinputInitNaturalScrollProperty(dev, driver_data, device);

commit 9c5cf971439292661e1f3055ef882526baae6310
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Jun 15 10:17:20 2015 +1000

    Support buttons > BTN_BACK on mice
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1230945
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/libinput.c b/src/libinput.c
index 595b177..a06e44f 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -456,7 +456,7 @@ xf86libinput_init_pointer(InputInfoPtr pInfo)
 	Atom btnlabels[MAX_BUTTONS];
 	Atom axislabels[TOUCHPAD_NUM_AXES];
 
-	for (i = BTN_BACK; i >= BTN_SIDE; i--) {
+	for (i = BTN_JOYSTICK - 1; i >= BTN_SIDE; i--) {
 		if (libinput_device_pointer_has_button(driver_data->device, i)) {
 			nbuttons += i - BTN_SIDE + 1;
 			break;


Reply to: