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

libinput: Changes to 'ubuntu'



 configure.ac                             |   27 
 debian/changelog                         |   12 
 doc/Makefile.am                          |    6 
 doc/absolute-axes.dox                    |    2 
 doc/dot/evemu.gv                         |   19 
 doc/faqs.dox                             |    2 
 doc/gestures.dox                         |    2 
 doc/normalization-of-relative-motion.dox |    6 
 doc/page-hierarchy.dox                   |    1 
 doc/palm-detection.dox                   |    4 
 doc/pointer-acceleration.dox             |  110 
 doc/reporting-bugs.dox                   |    8 
 doc/seats.dox                            |    4 
 doc/svg/ptraccel-linear.svg              | 5486 +++++++++++++++++++++++++++++++
 doc/svg/ptraccel-low-dpi.svg             | 3748 +++++++++++++++++++++
 doc/svg/ptraccel-touchpad.svg            | 1723 +++++++++
 doc/svg/ptraccel-trackpoint.svg          | 3689 ++++++++++++++++++++
 doc/tapping.dox                          |    2 
 doc/tools.dox                            |    4 
 doc/touchpads.dox                        |    6 
 src/evdev-middle-button.c                |    4 
 src/evdev-mt-touchpad-edge-scroll.c      |   23 
 src/evdev-mt-touchpad-gestures.c         |    3 
 src/evdev-mt-touchpad.c                  |   27 
 src/evdev-mt-touchpad.h                  |    4 
 src/evdev.c                              |   71 
 src/evdev.h                              |   11 
 src/filter-private.h                     |    8 
 src/filter.c                             |  591 ++-
 src/filter.h                             |   44 
 src/libinput-private.h                   |   14 
 src/libinput-util.h                      |    6 
 src/libinput.c                           |   30 
 src/libinput.h                           |   12 
 test/device.c                            |  155 
 test/litest-int.h                        |    4 
 test/litest.c                            |   21 
 test/touchpad.c                          |  111 
 tools/Makefile.am                        |    2 
 tools/make-ptraccel-graphs.sh            |   79 
 tools/ptraccel-debug.c                   |   48 
 tools/shared.c                           |  244 -
 udev/libinput-model-quirks.c             |    2 
 43 files changed, 15992 insertions(+), 383 deletions(-)

New commits:
commit 3a9fc5c482ec51047526f47d851af356e48b0e3a
Author: Timo Aaltonen <tjaalton@debian.org>
Date:   Fri Sep 25 05:48:40 2015 +0300

    release to wily

diff --git a/debian/changelog b/debian/changelog
index b4520e7..f1ff48f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-libinput (1.0.1-1ubuntu1) UNRELEASED; urgency=medium
+libinput (1.0.1-1ubuntu1) wily; urgency=medium
 
   * Merge new upstream release from Debian.
 
- -- Timo Aaltonen <tjaalton@debian.org>  Thu, 24 Sep 2015 04:54:21 +0300
+ -- Timo Aaltonen <tjaalton@debian.org>  Fri, 25 Sep 2015 05:48:21 +0300
 
 libinput (1.0.1-1) unstable; urgency=medium
 

commit 0b72f4e6681fe7a4c7d9b3525564f6a29ca3c762
Author: Timo Aaltonen <tjaalton@debian.org>
Date:   Fri Sep 25 05:48:19 2015 +0300

    update the changelog

diff --git a/debian/changelog b/debian/changelog
index b043d23..b4520e7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libinput (1.0.1-1ubuntu1) UNRELEASED; urgency=medium
+
+  * Merge new upstream release from Debian.
+
+ -- Timo Aaltonen <tjaalton@debian.org>  Thu, 24 Sep 2015 04:54:21 +0300
+
 libinput (1.0.1-1) unstable; urgency=medium
 
   * New upstream release.

commit 90022b44a90b0bde65fe3fbe1a6c4091e3b70187
Author: Timo Aaltonen <tjaalton@debian.org>
Date:   Thu Sep 3 11:52:21 2015 +0300

    release to unstable

diff --git a/debian/changelog b/debian/changelog
index 4db3485..b0c365e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-libinput (1.0.1-1) UNRELEASED; urgency=medium
+libinput (1.0.1-1) unstable; urgency=medium
 
   * New upstream release.
 
- -- Timo Aaltonen <tjaalton@debian.org>  Thu, 03 Sep 2015 11:47:19 +0300
+ -- Timo Aaltonen <tjaalton@debian.org>  Thu, 03 Sep 2015 11:52:08 +0300
 
 libinput (0.21.0-1) unstable; urgency=medium
 

commit 5f6f888debc2a6deed9cbb1630ec3ef01efc3757
Author: Timo Aaltonen <tjaalton@debian.org>
Date:   Thu Sep 3 11:48:14 2015 +0300

    update the changelog

diff --git a/debian/changelog b/debian/changelog
index 6f96377..4db3485 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libinput (1.0.1-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+
+ -- Timo Aaltonen <tjaalton@debian.org>  Thu, 03 Sep 2015 11:47:19 +0300
+
 libinput (0.21.0-1) unstable; urgency=medium
 
   * New upstream release.

commit a52cc616b4c00d0975a3311a2a06057bdb419ba2
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Sep 3 16:34:35 2015 +1000

    configure.ac: libinput 1.0.1
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 60664d1..4e0d9f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_PREREQ([2.64])
 
 m4_define([libinput_major_version], [1])
 m4_define([libinput_minor_version], [0])
-m4_define([libinput_micro_version], [0])
+m4_define([libinput_micro_version], [1])
 m4_define([libinput_version],
           [libinput_major_version.libinput_minor_version.libinput_micro_version])
 
@@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
 # b) If interfaces have been changed or added, but binary compatibility has
 #    been preserved, change to C+1:0:A+1
 # c) If the interface is the same as the previous version, change to C:R+1:A
-LIBINPUT_LT_VERSION=15:2:5
+LIBINPUT_LT_VERSION=15:3:5
 AC_SUBST(LIBINPUT_LT_VERSION)
 
 AM_SILENT_RULES([yes])

commit fc337c3895a1b107a219eb004993e6460bb74309
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Aug 31 14:05:11 2015 +1000

    filter: fix constant acceleration for the X230
    
    The x230 has a special acceleration method that relies on the touchpad magic
    slowdown. This was missing from commit c8da19b50a30d8, making two-finger
    scroll motions unusably fast
    
    https://bugs.freedesktop.org/show_bug.cgi?id=91819
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit 6a0f9411f232148b297de40456dcbafc07067cd2)

diff --git a/src/filter.c b/src/filter.c
index 5df50d3..a646857 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -114,6 +114,8 @@ filter_get_speed(struct motion_filter *filter)
 #define X230_THRESHOLD v_ms2us(0.4)		/* in units/us */
 #define X230_ACCELERATION 2.0			/* unitless factor */
 #define X230_INCLINE 1.1			/* unitless factor */
+#define X230_MAGIC_SLOWDOWN 0.4			/* unitless */
+#define X230_TP_MAGIC_LOW_RES_FACTOR 4.0	/* unitless */
 
 /*
  * Pointer acceleration filter constants
@@ -421,6 +423,21 @@ accelerator_filter_x230(struct motion_filter *filter,
 }
 
 static struct normalized_coords
+accelerator_filter_constant_x230(struct motion_filter *filter,
+				 const struct normalized_coords *unaccelerated,
+				 void *data, uint64_t time)
+{
+	struct normalized_coords normalized;
+	const double factor =
+		X230_MAGIC_SLOWDOWN/X230_TP_MAGIC_LOW_RES_FACTOR;
+
+	normalized.x = factor * unaccelerated->x;
+	normalized.y = factor * unaccelerated->y;
+
+	return normalized;
+}
+
+static struct normalized_coords
 touchpad_constant_filter(struct motion_filter *filter,
 			 const struct normalized_coords *unaccelerated,
 			 void *data, uint64_t time)
@@ -631,26 +648,22 @@ touchpad_lenovo_x230_accel_profile(struct motion_filter *filter,
 				      double speed_in,
 				      uint64_t time)
 {
-	/* Keep the magic factor from touchpad_accel_profile_linear.  */
-	const double X230_MAGIC_SLOWDOWN = 0.4; /* unitless */
-
 	/* Those touchpads presents an actual lower resolution that what is
 	 * advertised. We see some jumps from the cursor due to the big steps
 	 * in X and Y when we are receiving data.
 	 * Apply a factor to minimize those jumps at low speed, and try
 	 * keeping the same feeling as regular touchpads at high speed.
 	 * It still feels slower but it is usable at least */
-	const double TP_MAGIC_LOW_RES_FACTOR = 4.0; /* unitless */
 	double factor; /* unitless */
 	struct pointer_accelerator *accel_filter =
 		(struct pointer_accelerator *)filter;
 
 	double f1, f2; /* unitless */
 	const double max_accel = accel_filter->accel *
-				  TP_MAGIC_LOW_RES_FACTOR; /* unitless factor */
+				  X230_TP_MAGIC_LOW_RES_FACTOR; /* unitless factor */
 	const double threshold = accel_filter->threshold /
-				  TP_MAGIC_LOW_RES_FACTOR; /* units/us */
-	const double incline = accel_filter->incline * TP_MAGIC_LOW_RES_FACTOR;
+				  X230_TP_MAGIC_LOW_RES_FACTOR; /* units/us */
+	const double incline = accel_filter->incline * X230_TP_MAGIC_LOW_RES_FACTOR;
 
 	/* Note: the magic values in this function are obtained by
 	 * trial-and-error. No other meaning should be interpreted.
@@ -658,14 +671,14 @@ touchpad_lenovo_x230_accel_profile(struct motion_filter *filter,
 	 * pointer_accel_profile_linear(), look at the git history of that
 	 * function for an explaination of what the min/max/etc. does.
 	 */
-	speed_in *= X230_MAGIC_SLOWDOWN / TP_MAGIC_LOW_RES_FACTOR;
+	speed_in *= X230_MAGIC_SLOWDOWN / X230_TP_MAGIC_LOW_RES_FACTOR;
 
 	f1 = min(1, v_us2ms(speed_in) * 5);
 	f2 = 1 + (v_us2ms(speed_in) - v_us2ms(threshold)) * incline;
 
 	factor = min(max_accel, f2 > 1 ? f2 : f1);
 
-	return factor * X230_MAGIC_SLOWDOWN / TP_MAGIC_LOW_RES_FACTOR;
+	return factor * X230_MAGIC_SLOWDOWN / X230_TP_MAGIC_LOW_RES_FACTOR;
 }
 
 double
@@ -795,7 +808,7 @@ create_pointer_accelerator_filter_touchpad(int dpi)
 
 struct motion_filter_interface accelerator_interface_x230 = {
 	.filter = accelerator_filter_x230,
-	.filter_constant = accelerator_filter_noop,
+	.filter_constant = accelerator_filter_constant_x230,
 	.restart = accelerator_restart,
 	.destroy = accelerator_destroy,
 	.set_speed = accelerator_set_speed,

commit 8215d725d0918e98cc72ac8fb0bbe57eb133542f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Aug 26 10:43:07 2015 +1000

    configure.ac: libinput 1.0
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index b54c2ad..60664d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
 AC_PREREQ([2.64])
 
-m4_define([libinput_major_version], [0])
-m4_define([libinput_minor_version], [99])
-m4_define([libinput_micro_version], [1])
+m4_define([libinput_major_version], [1])
+m4_define([libinput_minor_version], [0])
+m4_define([libinput_micro_version], [0])
 m4_define([libinput_version],
           [libinput_major_version.libinput_minor_version.libinput_micro_version])
 
@@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
 # b) If interfaces have been changed or added, but binary compatibility has
 #    been preserved, change to C+1:0:A+1
 # c) If the interface is the same as the previous version, change to C:R+1:A
-LIBINPUT_LT_VERSION=15:1:5
+LIBINPUT_LT_VERSION=15:2:5
 AC_SUBST(LIBINPUT_LT_VERSION)
 
 AM_SILENT_RULES([yes])

commit 84318021c04bacd13d422614c06efad95d020cf6
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Aug 24 09:35:40 2015 +1000

    doc: add a diagram for evemu and note that libinput doesn't recordings
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/doc/Makefile.am b/doc/Makefile.am
index a8d4182..fe70f6a 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -34,6 +34,7 @@ diagram_files = \
 	$(srcdir)/dot/libinput-stack-wayland.gv \
 	$(srcdir)/dot/libinput-stack-xorg.gv \
 	$(srcdir)/dot/libinput-stack-gnome.gv \
+	$(srcdir)/dot/evemu.gv \
 	$(srcdir)/svg/software-buttons.svg \
 	$(srcdir)/svg/clickfinger.svg \
 	$(srcdir)/svg/button-scrolling.svg \
diff --git a/doc/dot/evemu.gv b/doc/dot/evemu.gv
new file mode 100644
index 0000000..85e93f3
--- /dev/null
+++ b/doc/dot/evemu.gv
@@ -0,0 +1,19 @@
+digraph stack
+{
+  compound=true;
+  rankdir="LR";
+  node [
+    shape="box";
+  ]
+
+  kernel [label="Kernel"];
+
+  libinput;
+  xserver [label="X Server"];
+
+  kernel -> libinput
+  libinput -> xserver
+
+  kernel -> evemu
+  evemu -> stdout
+}
diff --git a/doc/reporting-bugs.dox b/doc/reporting-bugs.dox
index ec0ef9b..07f4be7 100644
--- a/doc/reporting-bugs.dox
+++ b/doc/reporting-bugs.dox
@@ -85,4 +85,10 @@ $ sudo evemu-play /dev/input/event4 < scroll.evemu
 If the bug is triggered by replaying on your device, attach the recording to
 the bug report.
 
+@note libinput does not affect the evemu recording. libinput and evemu talk
+directly to the kernel's device nodes. An evemu recording is not influenced
+by the libinput version or whether a libinput context is currently active.
+
+@dotfile evemu.gv
+
 */

commit 7095b765acc8851d0faaab990d65028d5a1d0b86
Author: Jason Gerecke <killertofu@gmail.com>
Date:   Fri Aug 21 08:42:54 2015 -0700

    doc: fix more typos
    
    Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/doc/absolute-axes.dox b/doc/absolute-axes.dox
index 7d205f6..664c616 100644
--- a/doc/absolute-axes.dox
+++ b/doc/absolute-axes.dox
@@ -67,7 +67,7 @@ or height. Note that rotation applies to the device's origin, rotation
 usually requires an offset to move the coordinates back into the original
 range.
 
-The most comon matrices are:
+The most common matrices are:
 
 - 90 degree clockwise:
 @f$
diff --git a/doc/faqs.dox b/doc/faqs.dox
index 9a78dea..0e49dac 100644
--- a/doc/faqs.dox
+++ b/doc/faqs.dox
@@ -30,7 +30,7 @@ scroll_sources.
 @section faq_gpl Is libinput GPL-licensed?
 
 No, libinput is MIT licensed. The Linux kernel header file linux/input.h in
-libinput's tree is provded to ensure the same behavior regardless of which
+libinput's tree is provided to ensure the same behavior regardless of which
 kernel version libinput is built on. It does not make libinput GPL-licensed.
 
 @section faq_config_options Where is the configuration stored?
diff --git a/doc/gestures.dox b/doc/gestures.dox
index a8cef36..02ef09a 100644
--- a/doc/gestures.dox
+++ b/doc/gestures.dox
@@ -82,7 +82,7 @@ screen as well as the context of those virtual objects:
 @image html touchscreen-gestures.svg "Context-sensitivity of touchscreen gestures"
 
 In this example, the finger movements are identical but in the left case
-both fingers are located within the same window, thus suggesting an attemp
+both fingers are located within the same window, thus suggesting an attempt
 to zoom. In the right case  both fingers are located on a window border,
 thus suggesting a window movement. libinput only has knowledge of the finger
 coordinates (and even then only in device coordinates, not in screen
diff --git a/doc/palm-detection.dox b/doc/palm-detection.dox
index 1a5e657..d30a207 100644
--- a/doc/palm-detection.dox
+++ b/doc/palm-detection.dox
@@ -46,10 +46,10 @@ will generate a button event for this touch.
 
 If a device provides a <a
 href="http://en.wikipedia.org/wiki/Pointing_stick";>trackpoint</a>, it is
-usually located above the touchpad. This increases the likelyhood of
+usually located above the touchpad. This increases the likelihood of
 accidental touches whenever the trackpoint is used.
 
-libinput disables the touchpad whenver it detects trackpoint activity for a
+libinput disables the touchpad whenever it detects trackpoint activity for a
 certain timeout until after trackpoint activity stops. Touches generated
 during this timeout will not move the pointer, and touches started during
 this timeout will likewise not move the pointer (allowing for a user to rest
diff --git a/doc/reporting-bugs.dox b/doc/reporting-bugs.dox
index 0755a9e..ec0ef9b 100644
--- a/doc/reporting-bugs.dox
+++ b/doc/reporting-bugs.dox
@@ -8,7 +8,7 @@ When reporting bugs against libinput, please follow the instructions below
 and provide the required data. This will speed up triage, resulting in a
 quicker bugfix.
 
-First, try to identify the bugi by reproducing it reliably. The more
+First, try to identify the bug by reproducing it reliably. The more
 specific a bug description is, the easier it is to fix. The @ref
 libinput-debug-events helper tool can help identify whether the bug is in
 libinput at all. This tool is a direct hook to libinput without a desktop
diff --git a/doc/seats.dox b/doc/seats.dox
index 5eec5de..f67de6b 100644
--- a/doc/seats.dox
+++ b/doc/seats.dox
@@ -5,7 +5,7 @@ Each device in libinput is assigned to one seat.
 A seat has two identifiers, the physical name and the logical name. The
 physical name is summarized as the list of devices a process on the same
 physical seat has access to. The logical seat name is the seat name for a
-logical group of devices. A compositor may use that to create additonal
+logical group of devices. A compositor may use that to create additional
 seats as independent device sets. Alternatively, a compositor may limit
 itself to a single logical seat, leaving a second compositor to manage
 devices on the other logical seats.
@@ -32,7 +32,7 @@ libinput_seat, all other devices reference their own respective seats.
 
 @section seats_and_features The effect of seat assignment
 
-A logical set is interprested as a group of devices that usually belong to a
+A logical set is interpreted as a group of devices that usually belong to a
 single user that interacts with a computer. Thus, the devices are
 semantically related. This means for devices within the same logical seat:
 
diff --git a/doc/tapping.dox b/doc/tapping.dox
index 483219a..e704400 100644
--- a/doc/tapping.dox
+++ b/doc/tapping.dox
@@ -40,7 +40,7 @@ disabled with libinput_device_config_tap_set_drag_lock_enabled().
 The above diagram explains the process, a tap (a) followed by a finger held
 down (b) starts the drag process and logically holds the left mouse button
 down. A movement of the finger (c) will drag the selected item until the
-finger is relased (e). If needed and drag lock is enabled, the finger's
+finger is released (e). If needed and drag lock is enabled, the finger's
 position can be reset by lifting and quickly setting it down again on the
 touchpad (d). This will be interpreted as continuing move and is especially
 useful on small touchpads or with slow pointer acceleration.
diff --git a/doc/tools.dox b/doc/tools.dox
index 2bf0793..7fe1e07 100644
--- a/doc/tools.dox
+++ b/doc/tools.dox
@@ -8,7 +8,7 @@ tools are usually installed, others are @ref developer_tools only.
 
 libinput ships with two tools to gather information about devices:
 @ref libinput-list-devices and @ref libinput-debug-events. Both tools must
-be run as root to have acess to the kernel's @c /dev/input/event* device
+be run as root to have access to the kernel's @c /dev/input/event* device
 files.
 
 @subsection libinput-list-devices
@@ -97,6 +97,6 @@ $ sudo ./tools/event-gui
 See the @c --help output for information about the available options.
 
 @note The @c --grab flag puts an exclusive @c EVIOCGRAB on the device to
-avoid interference with the desktiop while testing.
+avoid interference with the desktop while testing.
 
 */
diff --git a/doc/touchpads.dox b/doc/touchpads.dox
index 401f16a..91a9b6a 100644
--- a/doc/touchpads.dox
+++ b/doc/touchpads.dox
@@ -130,7 +130,7 @@ located underneath the keyboard, accidental palm touches are a non-issue.
 
 Pressure is usually directly related to contact area. Human fingers flatten
 out as the pressure on the pad increases, resulting in a bigger contact area
-and the firmware then calculates that back into a ressure reading.
+and the firmware then calculates that back into a pressure reading.
 
 libinput uses pressure to detect accidental palm contact and thumbs, though
 pressure data is often device-specific and unreliable.

commit 4c8f8a7ea275c17ce95bbbd6e239a0e339e316ea
Author: Andreas Pokorny <andreas.pokorny@canonical.com>
Date:   Thu Aug 20 12:51:37 2015 +0200

    test: fix gcc warning about missing prototypes
    
    Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/test/litest.c b/test/litest.c
index 26c5e43..6b28ee0 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -44,6 +44,8 @@
 #include <sys/sendfile.h>
 #include <sys/timerfd.h>
 #include <sys/wait.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <libudev.h>
 
 #include "litest.h"

commit d0ae1d99b358c81b495d3ff2c0a89d2689692661
Author: Andreas Pokorny <andreas.pokorny@canonical.com>
Date:   Thu Aug 20 10:31:47 2015 +0200

    doc: ellipse instead of ellipsis
    
    Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/doc/touchpads.dox b/doc/touchpads.dox
index fa509bc..401f16a 100644
--- a/doc/touchpads.dox
+++ b/doc/touchpads.dox
@@ -71,7 +71,7 @@ touches, others support 5 touches like the Synaptics touchpads when using
 SMBus.
 
 These touchpads usually also provide extra information. Apple touchpads
-provide an ellipsis and the orientation of the ellipsis for each touch point.
+provide an ellipse and the orientation of the ellipse for each touch point.
 Other touchpads provide a pressure value for each touch point (see @ref
 touchpads_pressure_handling).
 
@@ -138,7 +138,7 @@ pressure data is often device-specific and unreliable.
 @subsection touchpads_circular Circular touchpads
 
 Only listed for completeness, circular touchpads have not been used in
-laptops for a number of years. These touchpad shaped in an ellipsis or
+laptops for a number of years. These touchpad shaped in an ellipse or
 straight.
 
 @subsection touchpads_tablets Graphics tablets

commit a2c9787a8bfa79f1ad2dce6e4bceda6ede3f5b49
Author: Andreas Pokorny <andreas.pokorny@canonical.com>
Date:   Thu Aug 20 10:33:32 2015 +0200

    doc: inverse event type restriction of x and y accessors
    
    Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/libinput.h b/src/libinput.h
index f2b77b3..88b3c05 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -894,7 +894,8 @@ libinput_event_touch_get_seat_slot(struct libinput_event_touch *event);
  * LIBINPUT_EVENT_TOUCH_MOTION, this function returns 0.
  *
  * @note It is an application bug to call this function for events of type
- * @ref LIBINPUT_EVENT_TOUCH_DOWN or @ref LIBINPUT_EVENT_TOUCH_MOTION.
+ * other than @ref LIBINPUT_EVENT_TOUCH_DOWN or @ref
+ * LIBINPUT_EVENT_TOUCH_MOTION.
  *
  * @param event The libinput touch event
  * @return The current absolute x coordinate
@@ -913,7 +914,8 @@ libinput_event_touch_get_x(struct libinput_event_touch *event);
  * LIBINPUT_EVENT_TOUCH_MOTION, this function returns 0.
  *
  * @note It is an application bug to call this function for events of type
- * @ref LIBINPUT_EVENT_TOUCH_DOWN or @ref LIBINPUT_EVENT_TOUCH_MOTION.
+ * other than @ref LIBINPUT_EVENT_TOUCH_DOWN or @ref
+ * LIBINPUT_EVENT_TOUCH_MOTION.
  *
  * @param event The libinput touch event
  * @return The current absolute y coordinate
@@ -931,7 +933,8 @@ libinput_event_touch_get_y(struct libinput_event_touch *event);
  * LIBINPUT_EVENT_TOUCH_MOTION, this function returns 0.
  *
  * @note It is an application bug to call this function for events of type
- * @ref LIBINPUT_EVENT_TOUCH_DOWN or @ref LIBINPUT_EVENT_TOUCH_MOTION.
+ * other than @ref LIBINPUT_EVENT_TOUCH_DOWN or @ref
+ * LIBINPUT_EVENT_TOUCH_MOTION.
  *
  * @param event The libinput touch event
  * @param width The current output screen width
@@ -951,7 +954,8 @@ libinput_event_touch_get_x_transformed(struct libinput_event_touch *event,
  * LIBINPUT_EVENT_TOUCH_MOTION, this function returns 0.
  *
  * @note It is an application bug to call this function for events of type
- * @ref LIBINPUT_EVENT_TOUCH_DOWN or @ref LIBINPUT_EVENT_TOUCH_MOTION.
+ * other than @ref LIBINPUT_EVENT_TOUCH_DOWN or @ref
+ * LIBINPUT_EVENT_TOUCH_MOTION.
  *
  * @param event The libinput touch event
  * @param height The current output screen height

commit 9c4241ca8274c599c630ec5eb0df0b93f70944d9
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Aug 17 13:15:01 2015 +1000

    configure.ac: libinput 1.0RC1
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 885cb39..b54c2ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
 AC_PREREQ([2.64])
 
 m4_define([libinput_major_version], [0])
-m4_define([libinput_minor_version], [21])
-m4_define([libinput_micro_version], [0])
+m4_define([libinput_minor_version], [99])
+m4_define([libinput_micro_version], [1])
 m4_define([libinput_version],
           [libinput_major_version.libinput_minor_version.libinput_micro_version])
 
@@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
 # b) If interfaces have been changed or added, but binary compatibility has
 #    been preserved, change to C+1:0:A+1
 # c) If the interface is the same as the previous version, change to C:R+1:A
-LIBINPUT_LT_VERSION=15:0:5
+LIBINPUT_LT_VERSION=15:1:5
 AC_SUBST(LIBINPUT_LT_VERSION)
 
 AM_SILENT_RULES([yes])

commit c8da19b50a30d840484383f41e0218814f1501a0
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Aug 6 14:59:38 2015 +1000

    touchpad: use unaccelerated motion data for scrolling
    
    For short and quick scroll gestures, those that should only trigger a few
    lines of scroll the pointer acceleration is wildly unpredictable. Since we
    average the motion of both fingers it's hard enough to intuitively predict
    what the motion will be like. On top of that is the small threshold before we
    start scrolling, so some of the initial motion gets swallowed before we
    accelerate, making the next motion even more unpredictable.
    
    The end result is that multiple seemingly identical finger motions cause
    wildly different scroll motion.
    
    Drop pointer acceleration for two-finger and edge scrolling. This makes short
    scroll motions much more predictable and doesn't seem to have much effect on
    long scroll motions. Plus, in natural scroll mode it really feels like the
    content is stuck to your fingers now. Go wash your hands.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1249365
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c
index eda62e4..b572a9f 100644
--- a/src/evdev-mt-touchpad-edge-scroll.c
+++ b/src/evdev-mt-touchpad-edge-scroll.c
@@ -390,7 +390,8 @@ tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time)
 		}
 
 		normalized = tp_get_delta(t);
-		normalized = tp_filter_motion(tp, &normalized, time);
+		/* scroll is not accelerated */
+		normalized = tp_filter_motion_unaccelerated(tp, &normalized, time);
 
 		switch (t->scroll.edge_state) {
 		case EDGE_SCROLL_TOUCH_STATE_NONE:
diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c
index d82a6fb..cc26e2a 100644
--- a/src/evdev-mt-touchpad-gestures.c
+++ b/src/evdev-mt-touchpad-gestures.c
@@ -328,7 +328,8 @@ tp_gesture_twofinger_handle_state_scroll(struct tp_dispatch *tp, uint64_t time)
 		delta = tp_get_average_touches_delta(tp);
 	}
 
-	delta = tp_filter_motion(tp, &delta, time);
+	/* scroll is not accelerated */
+	delta = tp_filter_motion_unaccelerated(tp, &delta, time);
 
 	if (normalized_is_zero(delta))
 		return GESTURE_2FG_STATE_SCROLL;
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index a32a771..aeb6c31 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -71,6 +71,18 @@ tp_filter_motion(struct tp_dispatch *tp,
 			       unaccelerated, tp, time);
 }
 
+struct normalized_coords
+tp_filter_motion_unaccelerated(struct tp_dispatch *tp,
+			       const struct normalized_coords *unaccelerated,
+			       uint64_t time)
+{
+	if (normalized_is_zero(*unaccelerated))
+		return *unaccelerated;
+
+	return filter_dispatch_constant(tp->device->pointer.filter,
+					unaccelerated, tp, time);
+}
+
 static inline void
 tp_motion_history_push(struct tp_touch *t)
 {
diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h
index 3bd8425..5f87c3f 100644
--- a/src/evdev-mt-touchpad.h
+++ b/src/evdev-mt-touchpad.h
@@ -395,6 +395,10 @@ struct normalized_coords
 tp_filter_motion(struct tp_dispatch *tp,
 		 const struct normalized_coords *unaccelerated,
 		 uint64_t time);
+struct normalized_coords
+tp_filter_motion_unaccelerated(struct tp_dispatch *tp,
+			       const struct normalized_coords *unaccelerated,
+			       uint64_t time);
 
 int
 tp_touch_active(struct tp_dispatch *tp, struct tp_touch *t);
diff --git a/src/filter.c b/src/filter.c
index 674b439..5df50d3 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -420,6 +420,19 @@ accelerator_filter_x230(struct motion_filter *filter,
 	return accelerated;
 }
 
+static struct normalized_coords
+touchpad_constant_filter(struct motion_filter *filter,
+			 const struct normalized_coords *unaccelerated,
+			 void *data, uint64_t time)
+{
+	struct normalized_coords normalized;
+
+	normalized.x = TP_MAGIC_SLOWDOWN * unaccelerated->x;
+	normalized.y = TP_MAGIC_SLOWDOWN * unaccelerated->y;
+
+	return normalized;
+}
+
 static void
 accelerator_restart(struct motion_filter *filter,
 		    void *data,
@@ -757,6 +770,14 @@ create_pointer_accelerator_filter_linear_low_dpi(int dpi)
 	return &filter->base;
 }
 
+struct motion_filter_interface accelerator_interface_touchpad = {
+	.filter = accelerator_filter,
+	.filter_constant = touchpad_constant_filter,
+	.restart = accelerator_restart,
+	.destroy = accelerator_destroy,
+	.set_speed = accelerator_set_speed,
+};
+
 struct motion_filter *
 create_pointer_accelerator_filter_touchpad(int dpi)
 {
@@ -766,7 +787,7 @@ create_pointer_accelerator_filter_touchpad(int dpi)
 	if (!filter)
 		return NULL;
 
-	filter->base.interface = &accelerator_interface;
+	filter->base.interface = &accelerator_interface_touchpad;
 	filter->profile = touchpad_accel_profile_linear;
 
 	return &filter->base;

commit d8c37a94c0fe9c77e39034e377ab8796ddc0da3f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Aug 17 16:32:20 2015 +1000

    filter: add a "filter_constant" hook to the filter interface
    
    For when we need to apply some transformation to the data but it shouldn't be
    acceleration. Example use are touchpad coordinates, even when not
    accelerating, we still want to apply the magic slowdown.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/src/filter-private.h b/src/filter-private.h
index f5e8b7f..eaf84ed 100644
--- a/src/filter-private.h
+++ b/src/filter-private.h
@@ -33,6 +33,10 @@ struct motion_filter_interface {
 			   struct motion_filter *filter,
 			   const struct normalized_coords *unaccelerated,
 			   void *data, uint64_t time);
+	struct normalized_coords (*filter_constant)(
+			   struct motion_filter *filter,
+			   const struct normalized_coords *unaccelerated,
+			   void *data, uint64_t time);
 	void (*restart)(struct motion_filter *filter,
 			void *data,
 			uint64_t time);
diff --git a/src/filter.c b/src/filter.c
index f92b9fd..674b439 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -64,6 +64,14 @@ filter_dispatch(struct motion_filter *filter,
 	return filter->interface->filter(filter, unaccelerated, data, time);
 }
 
+struct normalized_coords
+filter_dispatch_constant(struct motion_filter *filter,
+			 const struct normalized_coords *unaccelerated,
+			 void *data, uint64_t time)
+{
+	return filter->interface->filter_constant(filter, unaccelerated, data, time);
+}
+
 void
 filter_restart(struct motion_filter *filter,
 	       void *data, uint64_t time)
@@ -320,6 +328,14 @@ accelerator_filter(struct motion_filter *filter,
 }
 
 static struct normalized_coords
+accelerator_filter_noop(struct motion_filter *filter,
+			const struct normalized_coords *unaccelerated,
+			void *data, uint64_t time)
+{
+	return *unaccelerated;
+}
+
+static struct normalized_coords
 accelerator_filter_low_dpi(struct motion_filter *filter,
 			   const struct normalized_coords *unaccelerated,
 			   void *data, uint64_t time)
@@ -673,6 +689,7 @@ trackpoint_accel_profile(struct motion_filter *filter,
 
 struct motion_filter_interface accelerator_interface = {
 	.filter = accelerator_filter,
+	.filter_constant = accelerator_filter_noop,
 	.restart = accelerator_restart,
 	.destroy = accelerator_destroy,
 	.set_speed = accelerator_set_speed,
@@ -719,6 +736,7 @@ create_pointer_accelerator_filter_linear(int dpi)
 
 struct motion_filter_interface accelerator_interface_low_dpi = {
 	.filter = accelerator_filter_low_dpi,
+	.filter_constant = accelerator_filter_noop,
 	.restart = accelerator_restart,
 	.destroy = accelerator_destroy,
 	.set_speed = accelerator_set_speed,
@@ -756,6 +774,7 @@ create_pointer_accelerator_filter_touchpad(int dpi)
 
 struct motion_filter_interface accelerator_interface_x230 = {
 	.filter = accelerator_filter_x230,
+	.filter_constant = accelerator_filter_noop,
 	.restart = accelerator_restart,
 	.destroy = accelerator_destroy,
 	.set_speed = accelerator_set_speed,
@@ -793,6 +812,7 @@ create_pointer_accelerator_filter_lenovo_x230(int dpi)
 
 struct motion_filter_interface accelerator_interface_trackpoint = {
 	.filter = accelerator_filter_trackpoint,
+	.filter_constant = accelerator_filter_noop,
 	.restart = accelerator_restart,
 	.destroy = accelerator_destroy,
 	.set_speed = accelerator_set_speed,
diff --git a/src/filter.h b/src/filter.h
index fd36da4..c8ade07 100644
--- a/src/filter.h
+++ b/src/filter.h
@@ -34,11 +34,33 @@
 
 struct motion_filter;
 
+/**
+ * Accelerate the given coordinates.
+ * Takes a set of unaccelerated deltas and accelerates them based on the
+ * current and previous motion.
+ *
+ * This is a superset of filter_dispatch_constant()
+ *
+ * @see filter_dispatch_constant
+ */
 struct normalized_coords
 filter_dispatch(struct motion_filter *filter,
 		const struct normalized_coords *unaccelerated,
 		void *data, uint64_t time);
 
+/**
+ * Apply constant motion filters, but no acceleration.
+ *
+ * Takes a set of unaccelerated deltas and applies any constant filters to
+ * it but does not accelerate the delta in the conventional sense.
+ *
+ * @see filter_dispatch
+ */
+struct normalized_coords
+filter_dispatch_constant(struct motion_filter *filter,
+			 const struct normalized_coords *unaccelerated,
+			 void *data, uint64_t time);
+
 void
 filter_restart(struct motion_filter *filter,
 	       void *data, uint64_t time);

commit e4fd60ce5ef0f634ecbc3c445b5a05acee66a09d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Aug 18 09:11:48 2015 +1000

    filter: move the TP_MAGIC_SLOWDOWN to a single definition
    
    Requires splitting out the X230 one so we don't accidentally break things if
    we ever change this.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/src/filter.c b/src/filter.c
index d05b53a..f92b9fd 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -36,6 +36,12 @@
 #include "libinput-util.h"
 #include "filter-private.h"
 
+/* Once normalized, touchpads see the same acceleration as mice. that is
+ * technically correct but subjectively wrong, we expect a touchpad to be a
+ * lot slower than a mouse. Apply a magic factor to slow down all movements
+ */
+#define TP_MAGIC_SLOWDOWN 0.4 /* unitless factor */
+
 /* Convert speed/velocity from units/us to units/ms */
 static inline double
 v_us2ms(double units_per_us)
@@ -581,12 +587,6 @@ touchpad_accel_profile_linear(struct motion_filter *filter,
                               double speed_in, /* units/us */
                               uint64_t time)
 {
-	/* Once normalized, touchpads see the same
-	   acceleration as mice. that is technically correct but
-	   subjectively wrong, we expect a touchpad to be a lot
-	   slower than a mouse. Apply a magic factor here and proceed
-	   as normal.  */
-	const double TP_MAGIC_SLOWDOWN = 0.4; /* unitless */
 	double factor; /* unitless */
 
 	speed_in *= TP_MAGIC_SLOWDOWN;
@@ -603,7 +603,7 @@ touchpad_lenovo_x230_accel_profile(struct motion_filter *filter,
 				      uint64_t time)
 {
 	/* Keep the magic factor from touchpad_accel_profile_linear.  */
-	const double TP_MAGIC_SLOWDOWN = 0.4; /* unitless */
+	const double X230_MAGIC_SLOWDOWN = 0.4; /* unitless */
 
 	/* Those touchpads presents an actual lower resolution that what is
 	 * advertised. We see some jumps from the cursor due to the big steps
@@ -629,14 +629,14 @@ touchpad_lenovo_x230_accel_profile(struct motion_filter *filter,
 	 * pointer_accel_profile_linear(), look at the git history of that
 	 * function for an explaination of what the min/max/etc. does.
 	 */
-	speed_in *= TP_MAGIC_SLOWDOWN / TP_MAGIC_LOW_RES_FACTOR;
+	speed_in *= X230_MAGIC_SLOWDOWN / TP_MAGIC_LOW_RES_FACTOR;
 
 	f1 = min(1, v_us2ms(speed_in) * 5);
 	f2 = 1 + (v_us2ms(speed_in) - v_us2ms(threshold)) * incline;
 
 	factor = min(max_accel, f2 > 1 ? f2 : f1);
 
-	return factor * TP_MAGIC_SLOWDOWN / TP_MAGIC_LOW_RES_FACTOR;
+	return factor * X230_MAGIC_SLOWDOWN / TP_MAGIC_LOW_RES_FACTOR;
 }
 
 double

commit dac38a08288a791756587a0053f3b7c1af63ec01


Reply to: