diff -Nru xserver-xorg-input-libinput-0.25.0/ChangeLog xserver-xorg-input-libinput-0.26.0/ChangeLog --- xserver-xorg-input-libinput-0.25.0/ChangeLog 2017-10-27 23:18:16.000000000 +0000 +++ xserver-xorg-input-libinput-0.26.0/ChangeLog 2017-10-27 23:18:16.000000000 +0000 @@ -1,3 +1,109 @@ +commit 2be6487de417473aac85ebd800392cdd8604c4a6 +Author: Peter Hutterer +Date: Fri Sep 15 11:26:54 2017 +1000 + + xf86-input-libinput 0.26.0 + + Signed-off-by: Peter Hutterer + +commit 6ce3d0249d426e6b3c83e7f86d76bb3145c00a74 +Author: Peter Hutterer +Date: Mon Jun 26 18:27:10 2017 +1000 + + Post a motion event before a tablet button down + + Not all clients update the pointer position correctly from the button events + (for historical reasons) so we need to send a motion event before the button + event that represents a tip state change. + + https://bugs.freedesktop.org/show_bug.cgi?id=101588 + + Signed-off-by: Peter Hutterer + +commit 87f9fe3a6fafe60134c69419c0e551b9dbc112b7 +Author: Peter Hutterer +Date: Wed May 24 08:42:02 2017 +1000 + + Only initialize properties that match capabilities on a subdevice + + If a device is split into multiple subdevices, usually pointer+keyboard, we + initialized properties matching the libinput device on both devices. This + results in the keyboard having e.g. a Accel Speed or Left Handed settings even + though it cannot send any events of that type. + + Filter by capabilities on the subdevice so we only get those properties that + match the subdevice's capabilities. + + https://bugs.freedesktop.org/show_bug.cgi?id=100900 + + Signed-off-by: Peter Hutterer + +commit 0c657e0dcff4cff06a0d4cbea7dfac2a1d505cc3 +Author: Peter Hutterer +Date: Thu May 18 14:02:52 2017 +1000 + + Update copyright years + + because why not + + Signed-off-by: Peter Hutterer + +commit ac3574958f90bdcac946d26519123d809998c33b +Author: Niklas Haas +Date: Mon May 15 03:13:43 2017 +0200 + + man: add missing documentation for Accel Profile + + This seems to have been simply missing from 0163482e. + + cf. https://bugs.freedesktop.org/show_bug.cgi?id=101017 + + Signed-off-by: Peter Hutterer + +commit 8772a593b45740f4429218648c9e3a305b3fe896 +Author: Martin Kepplinger +Date: Thu May 4 08:49:34 2017 +0200 + + Fix config comment description to match the config + + Since the config matches on tablets too, update the describing comment + accordingly. + + Signed-off-by: Martin Kepplinger + Signed-off-by: Peter Hutterer + +commit a80773a488da3f3dfe5a5dc0fd658dc8a6a3b331 +Author: Peter Hutterer +Date: Fri May 5 13:43:23 2017 +1000 + + xf86-input-libinput 0.25.1 + + Signed-off-by: Peter Hutterer + +commit 8bc694595d26c2ae7dd98b27c9eed0ec0366b7a5 +Author: Peter Hutterer +Date: Tue Mar 21 13:13:43 2017 +1000 + + Post a motion event after proximity events + + This patch splits the meat of xf86libinput_handle_tablet_axis into a helper + function xf86libinput_post_tablet_motion(), to be called right after we send + the proximity in event. + + Clients that don't handle proximity (e.g. all XI2 clients) don't see the + coordinates we send along with the proximity events. And, for historical + reasons, they may not look at the coordinates in button events. So a device + that comes into proximity and immediately sends a tip down button event + doesn't send a motion event, causing the client to think the tip down was at + whatever the last known position was (before previous prox-out). + + The practical effect is that when a user tries to draw a few dots, they end up + being connected to each other. + + https://bugzilla.redhat.com/show_bug.cgi?id=1433755 + + Signed-off-by: Peter Hutterer + commit 153a7fc62fa87a2cc2516826b3eae16fa8cc861d Author: Peter Hutterer Date: Thu Mar 9 15:58:39 2017 +1000 diff -Nru xserver-xorg-input-libinput-0.25.0/conf/40-libinput.conf xserver-xorg-input-libinput-0.26.0/conf/40-libinput.conf --- xserver-xorg-input-libinput-0.25.0/conf/40-libinput.conf 2017-03-09 06:02:21.000000000 +0000 +++ xserver-xorg-input-libinput-0.26.0/conf/40-libinput.conf 2017-09-15 01:33:45.000000000 +0000 @@ -1,4 +1,4 @@ -# Match on all types of devices but tablet devices and joysticks +# Match on all types of devices but joysticks Section "InputClass" Identifier "libinput pointer catchall" MatchIsPointer "on" diff -Nru xserver-xorg-input-libinput-0.25.0/configure.ac xserver-xorg-input-libinput-0.26.0/configure.ac --- xserver-xorg-input-libinput-0.25.0/configure.ac 2017-03-09 06:02:21.000000000 +0000 +++ xserver-xorg-input-libinput-0.26.0/configure.ac 2017-09-15 01:33:45.000000000 +0000 @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-libinput], - [0.25.0], + [0.26.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-libinput]) AC_CONFIG_SRCDIR([Makefile.am]) diff -Nru xserver-xorg-input-libinput-0.25.0/debian/changelog xserver-xorg-input-libinput-0.26.0/debian/changelog --- xserver-xorg-input-libinput-0.25.0/debian/changelog 2017-10-27 23:18:16.000000000 +0000 +++ xserver-xorg-input-libinput-0.26.0/debian/changelog 2017-10-27 23:18:16.000000000 +0000 @@ -1,14 +1,8 @@ -xserver-xorg-input-libinput (0.25.0-0ubuntu1) zesty; urgency=medium - - * Sync from debian git. - - -- Timo Aaltonen Fri, 10 Mar 2017 11:04:50 +0200 - -xserver-xorg-input-libinput (0.25.0-1) UNRELEASED; urgency=medium +xserver-xorg-input-libinput (0.26.0-1) unstable; urgency=medium * New upstream release. - -- Timo Aaltonen Thu, 09 Feb 2017 13:49:32 +0200 + -- Timo Aaltonen Sat, 23 Sep 2017 14:47:01 +0300 xserver-xorg-input-libinput (0.23.0-2) unstable; urgency=medium diff -Nru xserver-xorg-input-libinput-0.25.0/man/libinput.man xserver-xorg-input-libinput-0.26.0/man/libinput.man --- xserver-xorg-input-libinput-0.25.0/man/libinput.man 2017-03-09 06:02:21.000000000 +0000 +++ xserver-xorg-input-libinput-0.26.0/man/libinput.man 2017-09-15 01:33:45.000000000 +0000 @@ -203,6 +203,14 @@ .B libinput driver. .TP 7 +.BI "libinput Accel Profiles Available" +2 boolean values (8 bit, 0 or 1), in order "adaptive", "flat". +Indicates which acceleration profiles are available on this device. +.TP 7 +.BI "libinput Accel Profile Enabled" +2 boolean values (8 bit, 0 or 1), in order "adaptive", "flat". +Indicates which acceleration profile is currently enabled on this device. +.TP 7 .BI "libinput Accel Speed" 1 32-bit float value, defines the pointer speed. Value range -1, 1 .TP 7 diff -Nru xserver-xorg-input-libinput-0.25.0/src/xf86libinput.c xserver-xorg-input-libinput-0.26.0/src/xf86libinput.c --- xserver-xorg-input-libinput-0.25.0/src/xf86libinput.c 2017-03-09 06:02:21.000000000 +0000 +++ xserver-xorg-input-libinput-0.26.0/src/xf86libinput.c 2017-09-15 01:33:45.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright © 2013-2015 Red Hat, Inc. + * Copyright © 2013-2017 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without @@ -212,6 +212,10 @@ static enum event_handling xf86libinput_handle_event(struct libinput_event *event); +static void +xf86libinput_post_tablet_motion(InputInfoPtr pInfo, + struct libinput_event_tablet_tool *event); + static inline int use_server_fd(const InputInfoPtr pInfo) { return pInfo->fd > -1 && (pInfo->flags & XI86_SERVER_FD); @@ -1716,12 +1720,15 @@ xf86libinput_handle_tablet_tip(InputInfoPtr pInfo, struct libinput_event_tablet_tool *event) { + DeviceIntPtr pDev = pInfo->dev; enum libinput_tablet_tool_tip_state state; const BOOL is_absolute = TRUE; if (xf86libinput_tool_queue_event(event)) return EVENT_QUEUED; + xf86libinput_post_tablet_motion(pDev->public.devicePrivate, event); + state = libinput_event_tablet_tool_get_tip_state(event); xf86PostButtonEventP(pInfo->dev, @@ -1776,8 +1783,8 @@ *y = sy; } -static enum event_handling -xf86libinput_handle_tablet_axis(InputInfoPtr pInfo, +static void +xf86libinput_post_tablet_motion(InputInfoPtr pInfo, struct libinput_event_tablet_tool *event) { DeviceIntPtr dev = pInfo->dev; @@ -1787,9 +1794,6 @@ double value; double x, y; - if (xf86libinput_tool_queue_event(event)) - return EVENT_QUEUED; - x = libinput_event_tablet_tool_get_x_transformed(event, TABLET_AXIS_MAX); y = libinput_event_tablet_tool_get_y_transformed(event, @@ -1839,13 +1843,23 @@ default: xf86IDrvMsg(pInfo, X_ERROR, "Invalid rotation axis on tool\n"); - return EVENT_HANDLED; + return; } valuator_mask_set_double(mask, valuator, value); } xf86PostMotionEventM(dev, Absolute, mask); +} + +static enum event_handling +xf86libinput_handle_tablet_axis(InputInfoPtr pInfo, + struct libinput_event_tablet_tool *event) +{ + if (xf86libinput_tool_queue_event(event)) + return EVENT_QUEUED; + + xf86libinput_post_tablet_motion(pInfo, event); return EVENT_HANDLED; } @@ -1977,6 +1991,13 @@ xf86PostProximityEventM(pDev, in_prox, mask); + /* We have to send an extra motion event after proximity to make + * sure the client got the updated x/y coordinates, especially if + * they don't handle proximity events (XI2). + */ + if (in_prox) + xf86libinput_post_tablet_motion(pDev->public.devicePrivate, event); + return EVENT_HANDLED; } @@ -5217,6 +5238,19 @@ 2, data); } +static inline bool +subdevice_filter_for_capabilities(DeviceIntPtr dev, + uint32_t capabilities) +{ + InputInfoPtr pInfo = dev->public.devicePrivate; + struct xf86libinput *driver_data = pInfo->private; + + if (!xf86libinput_is_subdevice(pInfo)) + return false; + + return !(driver_data->capabilities & capabilities); +} + static void LibinputInitProperty(DeviceIntPtr dev) { @@ -5229,21 +5263,35 @@ prop_float = XIGetKnownProperty("FLOAT"); - LibinputInitTapProperty(dev, driver_data, device); - LibinputInitTapDragProperty(dev, driver_data, device); - LibinputInitTapDragLockProperty(dev, driver_data, device); - LibinputInitTapButtonmapProperty(dev, driver_data, device); - LibinputInitCalibrationProperty(dev, driver_data, device); - LibinputInitAccelProperty(dev, driver_data, device); - LibinputInitNaturalScrollProperty(dev, driver_data, device); + /* On a subdevice, we likely only have a keyboard, so filter out the + * properties for the capabilities we don't have */ + if (!subdevice_filter_for_capabilities(dev, CAP_POINTER|CAP_TOUCH)) { + LibinputInitTapProperty(dev, driver_data, device); + LibinputInitTapDragProperty(dev, driver_data, device); + LibinputInitTapDragLockProperty(dev, driver_data, device); + LibinputInitTapButtonmapProperty(dev, driver_data, device); + LibinputInitNaturalScrollProperty(dev, driver_data, device); + } + + if (!subdevice_filter_for_capabilities(dev, CAP_TOUCH|CAP_TABLET)) { + LibinputInitCalibrationProperty(dev, driver_data, device); + LibinputInitLeftHandedProperty(dev, driver_data, device); + LibinputInitAccelProperty(dev, driver_data, device); + } + + if (!subdevice_filter_for_capabilities(dev, CAP_POINTER)) { + LibinputInitScrollMethodsProperty(dev, driver_data, device); + LibinputInitClickMethodsProperty(dev, driver_data, device); + LibinputInitMiddleEmulationProperty(dev, driver_data, device); + LibinputInitRotationAngleProperty(dev, driver_data, device); + } + + if (!subdevice_filter_for_capabilities(dev, CAP_TABLET_PAD)) { + LibinputInitModeGroupProperties(dev, driver_data, device); + } + LibinputInitSendEventsProperty(dev, driver_data, device); - LibinputInitLeftHandedProperty(dev, driver_data, device); - LibinputInitScrollMethodsProperty(dev, driver_data, device); - LibinputInitClickMethodsProperty(dev, driver_data, device); - LibinputInitMiddleEmulationProperty(dev, driver_data, device); LibinputInitDisableWhileTypingProperty(dev, driver_data, device); - LibinputInitModeGroupProperties(dev, driver_data, device); - LibinputInitRotationAngleProperty(dev, driver_data, device); /* Device node property, read-only */ device_node = driver_data->path;