Hello community,
here is the log from the commit of package xf86-input-libinput for
openSUSE:Factory checked in at 2016-03-02 14:18:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-12-29 13:00:15.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.xf86-input-libinput.new/xf86-input-libinput.changes
2016-03-02 14:18:58.000000000 +0100
@@ -1,0 +2,10 @@
+Fri Feb 26 17:35:44 UTC 2016 - [email protected]
+
+- Update to version 0.17.0:
+ + Fix compiler warnings about missing tablet event cases.
+ + Add property/option for enabling/disabling tap-n-drag.
+ + Fix default tapping drag lock property value.
+ + Allow hotplugging a device immediately.
+ + Change creating subdevices to something more generic.
+
+-------------------------------------------------------------------
Old:
----
xf86-input-libinput-0.16.0.tar.bz2
xf86-input-libinput-0.16.0.tar.bz2.sig
New:
----
xf86-input-libinput-0.17.0.tar.bz2
xf86-input-libinput-0.17.0.tar.bz2.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xf86-input-libinput.spec ++++++
--- /var/tmp/diff_new_pack.7GHUF2/_old 2016-03-02 14:18:59.000000000 +0100
+++ /var/tmp/diff_new_pack.7GHUF2/_new 2016-03-02 14:18:59.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package xf86-input-libinput
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 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.16.0
+Version: 0.17.0
Release: 0
Summary: Libinput driver for the Xorg X server
License: MIT
@@ -28,10 +28,10 @@
Source2: %{name}.keyring
Patch0: n_enable-tapping.patch
BuildRequires: pkg-config
-BuildRequires: pkgconfig(inputproto)
-BuildRequires: pkgconfig(libinput) >= 1.0.901
+BuildRequires: pkgconfig(inputproto) >= 2.2
+BuildRequires: pkgconfig(libinput) >= 1.1.901
BuildRequires: pkgconfig(xorg-macros) >= 1.13
-BuildRequires: pkgconfig(xorg-server) >= 1.7
+BuildRequires: pkgconfig(xorg-server) >= 1.10
BuildRequires: pkgconfig(xproto)
#Supplements: xorg-x11-server
# This was part of the xorg-x11-driver-input package up to version 7.6
++++++ xf86-input-libinput-0.16.0.tar.bz2 -> xf86-input-libinput-0.17.0.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-input-libinput-0.16.0/ChangeLog
new/xf86-input-libinput-0.17.0/ChangeLog
--- old/xf86-input-libinput-0.16.0/ChangeLog 2015-12-23 04:55:18.000000000
+0100
+++ new/xf86-input-libinput-0.17.0/ChangeLog 2016-02-26 07:00:58.000000000
+0100
@@ -1,3 +1,56 @@
+commit 8136113139dd2a27fcfa4552da89aa110bc8fbe3
+Author: Peter Hutterer <[email protected]>
+Date: Fri Feb 26 15:57:48 2016 +1000
+
+ xf86-input-libinput 0.17.0
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
+commit 202eb68dc061510d57900d29b3a76fe2ed811998
+Author: Peter Hutterer <[email protected]>
+Date: Thu Jan 28 15:02:54 2016 +1000
+
+ Fix compiler warnings about missing tablet event cases
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
+commit e8f5394b0734db41abd15ab72457aea99c25d9ab
+Author: Peter Hutterer <[email protected]>
+Date: Wed Jan 27 11:04:40 2016 +1000
+
+ Add property/option for enabling/disabling tap-n-drag
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+ Reviewed-by: Hans de Goede <[email protected]>
+
+commit 20f5269a29b6f3697984872d689fbe8589e53b08
+Author: Peter Hutterer <[email protected]>
+Date: Wed Jan 27 11:12:48 2016 +1000
+
+ Fix default tapping drack lock property value
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
+commit 3dacb28b206098f261d731195ed7556fc83837ed
+Author: Peter Hutterer <[email protected]>
+Date: Tue Nov 24 13:00:52 2015 +1000
+
+ Allow hotplugging a device immediately
+
+ This splits the hotplugging code up so we can use it through a callback but
+ also as an immediate call that gives us back the device just hotplugged.
Also
+ added is the ability to add extra options to the device.
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
+commit db8e73141c3ebb09c19e95aab5dee46d331835df
+Author: Peter Hutterer <[email protected]>
+Date: Mon Nov 23 15:31:59 2015 +1000
+
+ Change creating subdevices to something more generic
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
commit 0d1851a000c5a80ba9b5787f516d2d72c62ce35e
Author: Peter Hutterer <[email protected]>
Date: Wed Dec 23 13:53:38 2015 +1000
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-input-libinput-0.16.0/Makefile.in
new/xf86-input-libinput-0.17.0/Makefile.in
--- old/xf86-input-libinput-0.16.0/Makefile.in 2015-12-23 04:54:42.000000000
+0100
+++ new/xf86-input-libinput-0.17.0/Makefile.in 2016-02-26 06:59:04.000000000
+0100
@@ -210,7 +210,8 @@
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(srcdir)/xorg-libinput.pc.in COPYING ChangeLog INSTALL \
- compile config.guess config.sub install-sh ltmain.sh missing
+ compile config.guess config.sub depcomp install-sh ltmain.sh \
+ missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-input-libinput-0.16.0/configure
new/xf86-input-libinput-0.17.0/configure
--- old/xf86-input-libinput-0.16.0/configure 2015-12-23 04:54:41.000000000
+0100
+++ new/xf86-input-libinput-0.17.0/configure 2016-02-26 06:59:03.000000000
+0100
@@ -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 0.16.0.
+# Generated by GNU Autoconf 2.69 for xf86-input-libinput 0.17.0.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -591,8 +591,8 @@
# Identity of this package.
PACKAGE_NAME='xf86-input-libinput'
PACKAGE_TARNAME='xf86-input-libinput'
-PACKAGE_VERSION='0.16.0'
-PACKAGE_STRING='xf86-input-libinput 0.16.0'
+PACKAGE_VERSION='0.17.0'
+PACKAGE_STRING='xf86-input-libinput 0.17.0'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_URL=''
@@ -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.16.0 to adapt to many kinds of
systems.
+\`configure' configures xf86-input-libinput 0.17.0 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.16.0:";;
+ short | recursive ) echo "Configuration of xf86-input-libinput 0.17.0:";;
esac
cat <<\_ACEOF
@@ -1561,7 +1561,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xf86-input-libinput configure 0.16.0
+xf86-input-libinput configure 0.17.0
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.16.0, which was
+It was created by xf86-input-libinput $as_me 0.17.0, 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.16.0'
+ VERSION='0.17.0'
cat >>confdefs.h <<_ACEOF
@@ -18377,12 +18377,12 @@
pkg_cv_LIBINPUT_CFLAGS="$LIBINPUT_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists
--print-errors \"libinput >= 1.0.901\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libinput >= 1.0.901") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists
--print-errors \"libinput >= 1.1.901\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libinput >= 1.1.901") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_LIBINPUT_CFLAGS=`$PKG_CONFIG --cflags "libinput >= 1.0.901"
2>/dev/null`
+ pkg_cv_LIBINPUT_CFLAGS=`$PKG_CONFIG --cflags "libinput >= 1.1.901"
2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -18394,12 +18394,12 @@
pkg_cv_LIBINPUT_LIBS="$LIBINPUT_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists
--print-errors \"libinput >= 1.0.901\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libinput >= 1.0.901") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists
--print-errors \"libinput >= 1.1.901\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libinput >= 1.1.901") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_LIBINPUT_LIBS=`$PKG_CONFIG --libs "libinput >= 1.0.901" 2>/dev/null`
+ pkg_cv_LIBINPUT_LIBS=`$PKG_CONFIG --libs "libinput >= 1.1.901" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -18420,14 +18420,14 @@
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- LIBINPUT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors
--cflags --libs "libinput >= 1.0.901" 2>&1`
+ LIBINPUT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors
--cflags --libs "libinput >= 1.1.901" 2>&1`
else
- LIBINPUT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs
"libinput >= 1.0.901" 2>&1`
+ LIBINPUT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs
"libinput >= 1.1.901" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBINPUT_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (libinput >= 1.0.901) were not met:
+ as_fn_error $? "Package requirements (libinput >= 1.1.901) were not met:
$LIBINPUT_PKG_ERRORS
@@ -19030,7 +19030,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.16.0, which was
+This file was extended by xf86-input-libinput $as_me 0.17.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -19096,7 +19096,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 0.16.0
+xf86-input-libinput config.status 0.17.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-0.16.0/configure.ac
new/xf86-input-libinput-0.17.0/configure.ac
--- old/xf86-input-libinput-0.16.0/configure.ac 2015-12-23 04:52:26.000000000
+0100
+++ new/xf86-input-libinput-0.17.0/configure.ac 2016-02-26 06:57:25.000000000
+0100
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-input-libinput],
- [0.16.0],
+ [0.17.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-input-libinput])
AC_CONFIG_SRCDIR([Makefile.am])
@@ -45,7 +45,7 @@
# 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 >= 1.0.901])
+PKG_CHECK_MODULES(LIBINPUT, [libinput >= 1.1.901])
# Define a configure option for an alternate input module directory
AC_ARG_WITH(xorg-module-dir,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/xf86-input-libinput-0.16.0/include/libinput-properties.h
new/xf86-input-libinput-0.17.0/include/libinput-properties.h
--- old/xf86-input-libinput-0.16.0/include/libinput-properties.h
2015-10-26 01:02:19.000000000 +0100
+++ new/xf86-input-libinput-0.17.0/include/libinput-properties.h
2016-02-08 01:46:23.000000000 +0100
@@ -30,6 +30,12 @@
/* Tapping default enabled/disabled: BOOL, 1 value, read-only */
#define LIBINPUT_PROP_TAP_DEFAULT "libinput Tapping Enabled Default"
+/* Tap drag enabled/disabled: BOOL, 1 value */
+#define LIBINPUT_PROP_TAP_DRAG "libinput Tapping Drag Enabled"
+
+/* Tap drag default enabled/disabled: BOOL, 1 value */
+#define LIBINPUT_PROP_TAP_DRAG_DEFAULT "libinput Tapping Drag Enabled Default"
+
/* Tap drag lock enabled/disabled: BOOL, 1 value */
#define LIBINPUT_PROP_TAP_DRAG_LOCK "libinput Tapping Drag Lock Enabled"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-input-libinput-0.16.0/man/libinput.man
new/xf86-input-libinput-0.17.0/man/libinput.man
--- old/xf86-input-libinput-0.16.0/man/libinput.man 2015-11-13
02:13:39.000000000 +0100
+++ new/xf86-input-libinput-0.17.0/man/libinput.man 2016-02-08
01:46:23.000000000 +0100
@@ -129,6 +129,14 @@
.BI "Option \*qTapping\*q \*q" bool \*q
Enables or disables tap-to-click behavior.
.TP 7
+.BI "Option \*qTappingDrag\*q \*q" bool \*q
+Enables or disables drag during tapping behavior ("tap-and-drag"). When
+enabled, a tap followed by a finger held down causes a single button down
+only, all motions of that finger thus translate into dragging motion.
+Tap-and-drag requires option
+.B Tapping
+to be enabled.
+.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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xf86-input-libinput-0.16.0/src/xf86libinput.c
new/xf86-input-libinput-0.17.0/src/xf86libinput.c
--- old/xf86-input-libinput-0.16.0/src/xf86libinput.c 2015-12-23
04:52:01.000000000 +0100
+++ new/xf86-input-libinput-0.17.0/src/xf86libinput.c 2016-02-26
06:56:57.000000000 +0100
@@ -112,6 +112,7 @@
struct options {
BOOL tapping;
+ BOOL tap_drag;
BOOL tap_drag_lock;
BOOL natural_scrolling;
BOOL left_handed;
@@ -136,6 +137,11 @@
struct xorg_list shared_device_link;
};
+enum hotplug_when {
+ HOTPLUG_LATER,
+ HOTPLUG_NOW,
+};
+
static inline int
use_server_fd(const InputInfoPtr pInfo) {
return pInfo->fd > -1 && (pInfo->flags & XI86_SERVER_FD);
@@ -381,6 +387,13 @@
"Failed to set Tapping DragLock to %d\n",
driver_data->options.tap_drag_lock);
+ if (libinput_device_config_tap_get_finger_count(device) > 0 &&
+ libinput_device_config_tap_set_drag_enabled(device,
+
driver_data->options.tap_drag) != LIBINPUT_CONFIG_STATUS_SUCCESS)
+ xf86IDrvMsg(pInfo, X_ERROR,
+ "Failed to set Tapping Drag to %d\n",
+ driver_data->options.tap_drag);
+
if (libinput_device_config_calibration_has_matrix(device) &&
libinput_device_config_calibration_set_matrix(device,
driver_data->options.matrix) != LIBINPUT_CONFIG_STATUS_SUCCESS)
@@ -1118,6 +1131,11 @@
case LIBINPUT_EVENT_GESTURE_PINCH_UPDATE:
case LIBINPUT_EVENT_GESTURE_PINCH_END:
break;
+ case LIBINPUT_EVENT_TABLET_TOOL_AXIS:
+ case LIBINPUT_EVENT_TABLET_TOOL_BUTTON:
+ case LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY:
+ case LIBINPUT_EVENT_TABLET_TOOL_TIP:
+ break;
}
}
@@ -1272,6 +1290,30 @@
}
static inline BOOL
+xf86libinput_parse_tap_drag_option(InputInfoPtr pInfo,
+ struct libinput_device *device)
+{
+ BOOL drag;
+
+ if (libinput_device_config_tap_get_finger_count(device) == 0)
+ return FALSE;
+
+ drag = xf86SetBoolOption(pInfo->options,
+ "TappingDrag",
+
libinput_device_config_tap_get_drag_enabled(device));
+
+ if (libinput_device_config_tap_set_drag_enabled(device, drag) !=
+ LIBINPUT_CONFIG_STATUS_SUCCESS) {
+ xf86IDrvMsg(pInfo, X_ERROR,
+ "Failed to set Tapping Drag Lock to %d\n",
+ drag);
+ drag = libinput_device_config_tap_get_drag_enabled(device);
+ }
+
+ return drag;
+}
+
+static inline BOOL
xf86libinput_parse_tap_drag_lock_option(InputInfoPtr pInfo,
struct libinput_device *device)
{
@@ -1678,6 +1720,7 @@
/* libinput options */
options->tapping = xf86libinput_parse_tap_option(pInfo, device);
+ options->tap_drag = xf86libinput_parse_tap_drag_option(pInfo, device);
options->tap_drag_lock = xf86libinput_parse_tap_drag_lock_option(pInfo,
device);
options->speed = xf86libinput_parse_accel_option(pInfo, device);
options->accel_profile = xf86libinput_parse_accel_profile_option(pInfo,
device);
@@ -1740,25 +1783,38 @@
InputOption *input_options;
};
-static Bool
-xf86libinput_hotplug_device(ClientPtr client, pointer closure)
+static DeviceIntPtr
+xf86libinput_hotplug_device(struct xf86libinput_hotplug_info *hotplug)
{
- struct xf86libinput_hotplug_info *hotplug = closure;
- DeviceIntPtr unused;
+ DeviceIntPtr dev;
- NewInputDeviceRequest(hotplug->input_options,
- hotplug->attrs,
- &unused);
+ if (NewInputDeviceRequest(hotplug->input_options,
+ hotplug->attrs,
+ &dev) != Success)
+ dev = NULL;
input_option_free_list(&hotplug->input_options);
FreeInputAttributes(hotplug->attrs);
free(hotplug);
+ return dev;
+}
+
+static Bool
+xf86libinput_hotplug_device_cb(ClientPtr client, pointer closure)
+{
+ struct xf86libinput_hotplug_info *hotplug = closure;
+
+ xf86libinput_hotplug_device(hotplug);
+
return TRUE;
}
-static void
-xf86libinput_create_keyboard_subdevice(InputInfoPtr pInfo)
+static DeviceIntPtr
+xf86libinput_create_subdevice(InputInfoPtr pInfo,
+ uint32_t capabilities,
+ enum hotplug_when when,
+ XF86OptionPtr extra_options)
{
struct xf86libinput *driver_data = pInfo->private;
struct xf86libinput_device *shared_device;
@@ -1773,7 +1829,14 @@
options = xf86OptionListDuplicate(pInfo->options);
options = xf86ReplaceStrOption(options, "_source", "_driver/libinput");
- options = xf86ReplaceStrOption(options, "_libinput/caps", "keyboard");
+ options = xf86OptionListMerge(options, extra_options);
+
+ if (capabilities & CAP_KEYBOARD)
+ options = xf86ReplaceBoolOption(options,
"_libinput/cap-keyboard", 1);
+ if (capabilities & CAP_POINTER)
+ options = xf86ReplaceBoolOption(options,
"_libinput/cap-pointer", 1);
+ if (capabilities & CAP_TOUCH)
+ options = xf86ReplaceBoolOption(options, "_libinput/cap-touch",
1);
/* need convert from one option list to the other. woohoo. */
o = options;
@@ -1787,13 +1850,18 @@
hotplug = calloc(1, sizeof(*hotplug));
if (!hotplug)
- return;
+ return NULL;
hotplug->input_options = iopts;
hotplug->attrs = DuplicateInputAttributes(pInfo->attrs);
xf86IDrvMsg(pInfo, X_INFO, "needs a virtual subdevice\n");
- QueueWorkProc(xf86libinput_hotplug_device, serverClient, hotplug);
+ if (when == HOTPLUG_LATER)
+ QueueWorkProc(xf86libinput_hotplug_device_cb, serverClient,
hotplug);
+ else
+ return xf86libinput_hotplug_device(hotplug);
+
+ return NULL;
}
static BOOL
@@ -1809,6 +1877,21 @@
return is_subdevice;
}
+static inline uint32_t
+caps_from_options(InputInfoPtr pInfo)
+{
+ uint32_t capabilities = 0;
+
+ if (xf86CheckBoolOption(pInfo->options, "_libinput/cap-keyboard", 0))
+ capabilities |= CAP_KEYBOARD;
+ if (xf86CheckBoolOption(pInfo->options, "_libinput/cap-pointer", 0))
+ capabilities |= CAP_POINTER;
+ if (xf86CheckBoolOption(pInfo->options, "_libinput/cap-touch", 0))
+ capabilities |= CAP_TOUCH;
+
+ return capabilities;
+}
+
static int
xf86libinput_pre_init(InputDriverPtr drv,
InputInfoPtr pInfo,
@@ -1903,7 +1986,7 @@
if (libinput_device_has_capability(device,
LIBINPUT_DEVICE_CAP_TOUCH))
driver_data->capabilities |= CAP_TOUCH;
} else {
- driver_data->capabilities = CAP_KEYBOARD;
+ driver_data->capabilities = caps_from_options(pInfo);
}
/* Disable acceleration in the server, libinput does it for us */
@@ -1918,7 +2001,10 @@
driver_data->capabilities & CAP_KEYBOARD &&
driver_data->capabilities & (CAP_POINTER|CAP_TOUCH)) {
driver_data->capabilities &= ~CAP_KEYBOARD;
- xf86libinput_create_keyboard_subdevice(pInfo);
+ xf86libinput_create_subdevice(pInfo,
+ CAP_KEYBOARD,
+ HOTPLUG_LATER,
+ NULL);
}
pInfo->type_name = xf86libinput_get_type_name(device, driver_data);
@@ -1998,6 +2084,8 @@
/* libinput-specific properties */
static Atom prop_tap;
static Atom prop_tap_default;
+static Atom prop_tap_drag;
+static Atom prop_tap_drag_default;
static Atom prop_tap_drag_lock;
static Atom prop_tap_drag_lock_default;
static Atom prop_calibration;
@@ -2088,6 +2176,37 @@
}
static inline int
+LibinputSetPropertyTapDrag(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->shared_device->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 = *data;
+ }
+
+ return Success;
+}
+
+static inline int
LibinputSetPropertyTapDragLock(DeviceIntPtr dev,
Atom atom,
XIPropertyValuePtr val,
@@ -2625,6 +2744,8 @@
if (atom == prop_tap)
rc = LibinputSetPropertyTap(dev, atom, val, checkonly);
+ else if (atom == prop_tap_drag)
+ rc = LibinputSetPropertyTapDrag(dev, atom, val, checkonly);
else if (atom == prop_tap_drag_lock)
rc = LibinputSetPropertyTapDragLock(dev, atom, val, checkonly);
else if (atom == prop_calibration)
@@ -2656,6 +2777,7 @@
rc = LibinputSetPropertyHorizScroll(dev, atom, val, checkonly);
else if (atom == prop_device || atom == prop_product_id ||
atom == prop_tap_default ||
+ atom == prop_tap_drag_default ||
atom == prop_tap_drag_lock_default ||
atom == prop_calibration_default ||
atom == prop_accel_default ||
@@ -2730,6 +2852,30 @@
}
static void
+LibinputInitTapDragProperty(DeviceIntPtr dev,
+ struct xf86libinput *driver_data,
+ struct libinput_device *device)
+{
+ BOOL drag = driver_data->options.tap_drag;
+
+ if (libinput_device_config_tap_get_finger_count(device) == 0)
+ return;
+
+ prop_tap_drag = LibinputMakeProperty(dev,
+ LIBINPUT_PROP_TAP_DRAG,
+ XA_INTEGER, 8,
+ 1, &drag);
+ if (!prop_tap_drag)
+ return;
+
+ drag = libinput_device_config_tap_get_default_drag_enabled(device);
+ prop_tap_drag_default = LibinputMakeProperty(dev,
+
LIBINPUT_PROP_TAP_DRAG_DEFAULT,
+ XA_INTEGER, 8,
+ 1, &drag);
+}
+
+static void
LibinputInitTapDragLockProperty(DeviceIntPtr dev,
struct xf86libinput *driver_data,
struct libinput_device *device)
@@ -2746,7 +2892,7 @@
if (!prop_tap_drag_lock)
return;
- drag_lock = libinput_device_config_tap_get_default_enabled(device);
+ drag_lock =
libinput_device_config_tap_get_default_drag_lock_enabled(device);
prop_tap_drag_lock_default = LibinputMakeProperty(dev,
LIBINPUT_PROP_TAP_DRAG_LOCK_DEFAULT,
XA_INTEGER, 8,
@@ -3245,6 +3391,7 @@
prop_float = XIGetKnownProperty("FLOAT");
LibinputInitTapProperty(dev, driver_data, device);
+ LibinputInitTapDragProperty(dev, driver_data, device);
LibinputInitTapDragLockProperty(dev, driver_data, device);
LibinputInitCalibrationProperty(dev, driver_data, device);
LibinputInitAccelProperty(dev, driver_data, device);