platform/upstream/libinput.git
9 years agopackaging: Bump to 0.18.0 sandbox/pcoval/latest tmp
Philippe Coval [Fri, 26 Jun 2015 12:05:20 +0000 (14:05 +0200)]
packaging: Bump to 0.18.0

Change-Id: I26b5a3a43e32997ffdd2adb6094a34ad854df8cb
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: Bump to 0.12.0
Philippe Coval [Thu, 12 Mar 2015 13:50:39 +0000 (14:50 +0100)]
packaging: Bump to 0.12.0

Change-Id: I5f78cc253f541a5a492e79b25fa21e9eb3a98b24
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: correct installation path of udev rule files on 64bit arch
Gwanglim Lee [Mon, 11 May 2015 05:27:56 +0000 (14:27 +0900)]
packaging: correct installation path of udev rule files on 64bit arch

Change-Id: I26ae6192c393516e18d72b1fedc0aa1c412f164b

9 years agopackaging: Bump to 0.11.0
Philippe Coval [Mon, 23 Feb 2015 09:05:08 +0000 (10:05 +0100)]
packaging: Bump to 0.11.0

Change-Id: I68ab7b18613657814e6535261ac85fad4019122a
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: Bump to 0.8.0
Manuel Bachmann [Sat, 14 Feb 2015 15:10:57 +0000 (16:10 +0100)]
packaging: Bump to 0.8.0

Change-Id: I661837a5368f60aeeb0760c1f419fd3c457faf31
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
9 years agopackaging: Bump to 0.6.0
Philippe Coval [Tue, 4 Nov 2014 15:31:28 +0000 (16:31 +0100)]
packaging: Bump to 0.6.0

Change-Id: Id66ecfc8dec24521687a572b699d0606b29ff4dc
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: Bump to 0.5.0
Philippe Coval [Thu, 14 Aug 2014 12:46:53 +0000 (14:46 +0200)]
packaging: Bump to 0.5.0

Change-Id: Icc00f5164583a5657e7699a686c76e49698093f2
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: use upstream tags
Philippe Coval [Thu, 14 Aug 2014 12:46:23 +0000 (14:46 +0200)]
packaging: use upstream tags

Change-Id: Ia5af4a9a3294e3359dd67f635be1c0e97a416387
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: Initial packaging on 0.1.0 for Tizen
Philippe Coval [Fri, 28 Feb 2014 15:46:59 +0000 (16:46 +0100)]
packaging: Initial packaging on 0.1.0 for Tizen

Change-Id: I682fc2715f9f8a60046c5c9297b7d96173131aeb
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agoconfigure.ac: libinput 0.18.0 0.18.0
Peter Hutterer [Mon, 22 Jun 2015 02:21:28 +0000 (12:21 +1000)]
configure.ac: libinput 0.18.0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotest: drop extra finger up/down in tapndrag + click test
Peter Hutterer [Sun, 21 Jun 2015 23:28:06 +0000 (09:28 +1000)]
test: drop extra finger up/down in tapndrag + click test

Already tested elsewhere

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotools: drop some superfluous parenthesis
Peter Hutterer [Mon, 22 Jun 2015 00:16:28 +0000 (10:16 +1000)]
tools: drop some superfluous parenthesis

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotouchpad: mark ALPS touchpads for middle button emulation
Peter Hutterer [Mon, 15 Jun 2015 04:37:49 +0000 (14:37 +1000)]
touchpad: mark ALPS touchpads for middle button emulation

Alps devices don't know if there is a physical middle button on the touchpad,
so they always report one.
Since a large number of touchpads only have two buttons, enable middle button
emulation by default. Those that really don't want it can play with
configuration options, everyone else has it working by default.

The hwdb entry uses "*Alps ..*" as name to also trigger the "litest Alps..."
devices.

https://bugzilla.redhat.com/show_bug.cgi?id=1227992

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotest: add ALPS DualPoint device
Peter Hutterer [Tue, 16 Jun 2015 05:36:40 +0000 (15:36 +1000)]
test: add ALPS DualPoint device

Same as the existing GlidePoint semi-mt device, but this one has a x/y
resolution.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotouchpad: disable right-edge palm detection for edge scrolling
Peter Hutterer [Tue, 16 Jun 2015 05:39:48 +0000 (15:39 +1000)]
touchpad: disable right-edge palm detection for edge scrolling

Most scroll motions would be labelled a palm.

https://bugs.freedesktop.org/show_bug.cgi?id=90980

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotest: move tapping tests into a separate binary
Peter Hutterer [Fri, 19 Jun 2015 04:58:16 +0000 (14:58 +1000)]
test: move tapping tests into a separate binary

The previous set hit _some_ sort of limit, but no idea what or why. When
adding one more test, the touchpad test case would reliably fail with a udev
timeout in litest_wait_for_udev(). This only happened in the valgrind case,
the normal run succeeded. Reproduced on three different installations (2 vms
on two different hosts).

Move the tapping tests into a separate binary, this unwedges whatever was
unhappy and sunshine, lollipops and rainbows are distributed generously.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotest: switch clickpad multitap to a ranged test
Peter Hutterer [Wed, 17 Jun 2015 00:50:10 +0000 (10:50 +1000)]
test: switch clickpad multitap to a ranged test

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotest: fix missing range value when the first test case is a ranged one
Peter Hutterer [Thu, 18 Jun 2015 03:18:16 +0000 (13:18 +1000)]
test: fix missing range value when the first test case is a ranged one

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotest: replace two asserts with litest_asserts
Peter Hutterer [Wed, 17 Jun 2015 01:21:23 +0000 (11:21 +1000)]
test: replace two asserts with litest_asserts

Having a backtrace is nice

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agoFix documentation for tap_get_enabled()
Peter Hutterer [Tue, 16 Jun 2015 06:52:48 +0000 (16:52 +1000)]
Fix documentation for tap_get_enabled()

Technically we return LIBINPUT_CONFIG_TAP_DISABLED, which is 0.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoCOPYING: Update boilerplate from MIT X11 to MIT Expat license
Peter Hutterer [Thu, 11 Jun 2015 02:09:18 +0000 (12:09 +1000)]
COPYING: Update boilerplate from MIT X11 to MIT Expat license

To quote Bryce Harrington from [1]:
"MIT has released software under several slightly different licenses,
including the old 'X11 License' or 'MIT License'.  Some code under this
license was in fact included in X.org's Xserver in the past.  However,
X.org now prefers the MIT Expat License as the standard (which,
confusingly, is also referred to as the 'MIT License').  See
http://cgit.freedesktop.org/xorg/xserver/tree/COPYING

When Wayland started, it was Kristian Høgsberg's intent to license it
compatibly with X.org.  "I wanted Wayland to be usable (license-wise)
whereever X was usable."  But, the text of the older X11 License was
taken for Wayland, rather than X11's current standard.  This patch
corrects this by swapping in the intended text."

libinput is a fork of weston and thus inherited the original license intent
and the license boilerplate itself.

See this thread on wayland-devel here for a discussion:
http://lists.freedesktop.org/archives/wayland-devel/2015-May/022301.html

[1] http://lists.freedesktop.org/archives/wayland-devel/2015-June/022552.html

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Acked-by: Jonas Ådahl <jadahl@gmail.com>
10 years agotouchpad: set the finger pin distance to 5mm where possible
Peter Hutterer [Fri, 12 Jun 2015 07:29:41 +0000 (17:29 +1000)]
touchpad: set the finger pin distance to 5mm where possible

On touchpads with resolutions, use a 5mm motion threshold before we unpin the
finger (allow motion events while a clickpad button is down). This should
remove any erroneous finger movements while clicking, at the cost of having to
move the finger a bit more for a single-finger click-and-drag (use two fingers
already!)

And drop the finger drifting, it was per-event based rather than time-based.
So unless the motion threshold was hit in a single event it was possible to
move the finger around the whole touchpad without ever unpinning it.

Drop the finger drifting altogether, if the touchpad drifts by more than 5mm
we have other issues.

https://bugzilla.redhat.com/show_bug.cgi?id=1230462

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agotouchpad: fix pinned finger drifting
Peter Hutterer [Fri, 12 Jun 2015 07:24:33 +0000 (17:24 +1000)]
touchpad: fix pinned finger drifting

This caused the finger to be unpinned on the first motion event after the
click, effectively disabling this feature.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agoudev: drop erroneous trailing colon from dmi matches
Peter Hutterer [Mon, 15 Jun 2015 04:12:09 +0000 (14:12 +1000)]
udev: drop erroneous trailing colon from dmi matches

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotouchpad: make the hysteresis dependent on physical distance
Peter Hutterer [Thu, 11 Jun 2015 06:31:00 +0000 (16:31 +1000)]
touchpad: make the hysteresis dependent on physical distance

Some touchpads, e.g. the Cyapa in the Acer c720 have a small axis range
([0, 870], [0, 470]), so the diagonal/magic value yields a hysteresis margin
of 1 device unit. On that device, that's one-tenth of a millimeter, causing
pointer motion just by holding the finger.

For touchpads that provide a physical resolution, set the hysteresis axes to
0.5mm and do away with the magic factor.

https://bugzilla.redhat.com/show_bug.cgi?id=1230441

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agoMove Wacom touchpad tagging to the udev rules
Peter Hutterer [Fri, 5 Jun 2015 06:17:04 +0000 (16:17 +1000)]
Move Wacom touchpad tagging to the udev rules

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agoMove apple touchpad tagging to the udev rules
Peter Hutterer [Fri, 5 Jun 2015 00:13:56 +0000 (10:13 +1000)]
Move apple touchpad tagging to the udev rules

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agotest: always install our own udev rule/hwdb files for tests
Peter Hutterer [Fri, 5 Jun 2015 00:52:04 +0000 (10:52 +1000)]
test: always install our own udev rule/hwdb files for tests

We can't rely on the system having these files installed, at least not in the
latest version that we'd like.
Copy them over from the source directory into the /run/ and /etc/ directories
for each test and update udev and the hwdb. This ensures the tags we set in
the hwdb file are always set, regardless of the system configuration.

Note that the /run/udev/* files need to have a different filename to the ones
we ship to avoid getting overridden by local configuration.

systemd does not have support for /run/udev/hwdb.d [1]. So our hwdb.d file
is in /etc/udev/hwdb.d instead and marked them with a REMOVEME and a comment
that if that file is left after the tests, it should be removed by the user.

[1] https://github.com/systemd/systemd/issues/127

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agotest: add missing libunwind cflags to test-litest-selftest
JoonCheol Park [Thu, 11 Jun 2015 07:38:02 +0000 (16:38 +0900)]
test: add missing libunwind cflags to test-litest-selftest

Signed-off-by: JoonCheol Park <jooncheol@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agofilter: require minimum acceleration factor of 0.3
Peter Hutterer [Mon, 8 Jun 2015 22:06:20 +0000 (08:06 +1000)]
filter: require minimum acceleration factor of 0.3

For really slow motions, the previous acceleration factor would go down to
effectively zero. So the slower the mouse motion was, the more it would be
slowed down which made the mouse at low speeds almost unusable.

Cap the minimum acceleration at 0.3 which provides a predictable slow motion
for the cursor when high precision is required.

New/old acceleration functions comparison:

  ^
  |               /
  |              /
ty|    _________/
  |   / /
  |  / /
  | / /
  |/ /    <----- new minimum accel factor
  | /
  |/___________________>
      tx

i.e. the general shape is maintained, but it doesn't go to zero anymore. The
functions aren't parallel, the new shape is slightly flatter than the previous
one and they meet at the point where the functions flatten for the threshold
(tx/ty). ascii art has its limits...

https://bugzilla.redhat.com/show_bug.cgi?id=1227039

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agotouchpad: restart the motion filter on touch begin
Peter Hutterer [Tue, 9 Jun 2015 23:54:06 +0000 (09:54 +1000)]
touchpad: restart the motion filter on touch begin

Our motion filter takes the last couple of vectors to calculate speed,
provided the direction stays the same and it is within a certain timeout. It
does not take into account lifting the finger, so the velocity on the first
event is off.

Real-world impact is mainly on scrolling. Before commit 289e4675
filter: enforce minimum velocity
the first motion on a scroll was accelerated by a factor of 0 and swallowed.
After 289e4675 the motion was calculated based on the timeout and a fraction
of the expected effect. Now the first scroll motion is based on the real
finger motion since setting the finger down and thus feels a bit more
responsive.

It also makes a couple of test cases using litest_assert_scroll() work again
since the miniumum motion is now as expected.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agodoc: make horizontal scrolling a separate section
Peter Hutterer [Tue, 9 Jun 2015 21:56:57 +0000 (07:56 +1000)]
doc: make horizontal scrolling a separate section

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agodoc: provide an outline of which scroll method is available where
Peter Hutterer [Tue, 9 Jun 2015 21:52:52 +0000 (07:52 +1000)]
doc: provide an outline of which scroll method is available where

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agodoc: add a note that middle-button dragging is not possible on sticks
Peter Hutterer [Tue, 9 Jun 2015 21:45:39 +0000 (07:45 +1000)]
doc: add a note that middle-button dragging is not possible on sticks

Just to have something to point bug reporters to.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: fix litest_log() when libunwind is missing
Peter Hutterer [Fri, 5 Jun 2015 01:40:26 +0000 (11:40 +1000)]
test: fix litest_log() when libunwind is missing

Previous expansion had side-effects when litest_log was called in an if
condition without {}

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agotest: replace a strncmp call with strneq
Peter Hutterer [Fri, 5 Jun 2015 00:39:30 +0000 (10:39 +1000)]
test: replace a strncmp call with strneq

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotouchpad: fix whitespace issue
Peter Hutterer [Fri, 5 Jun 2015 00:10:56 +0000 (10:10 +1000)]
touchpad: fix whitespace issue

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoconfigure.ac: libinput 0.17.0 0.17.0
Peter Hutterer [Thu, 4 Jun 2015 00:20:25 +0000 (10:20 +1000)]
configure.ac: libinput 0.17.0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotouchpad: on non-resolution touchpads, use 30% as maximum clickfinger spread
Peter Hutterer [Wed, 3 Jun 2015 04:27:43 +0000 (14:27 +1000)]
touchpad: on non-resolution touchpads, use 30% as maximum clickfinger spread

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agotouchpad: impose maximum distance limits on clickfingers
Peter Hutterer [Wed, 3 Jun 2015 02:15:51 +0000 (12:15 +1000)]
touchpad: impose maximum distance limits on clickfingers

A common use-case for clickfinger is to use the index finger for moving the
pointer, then triggering the click with a thumb. If the index finger isn't
lifted before the click this counted as two-finger click.

To avoid this, check the distance between touches on the touchpad (on
touchpads reporting resolution values anyway). If the touches are too far
apart, don't count them together (or specifically only count those close
enough together as multi-finger).

The touch area is uneven, it's wider than high. Spreading fingers horizontally
is more common and this also makes it easier to rule out thumbs which tend to
be well below the fingers.

http://bugs.freedesktop.org/show_bug.cgi?id=90526

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agotouchpad: move clickfinger finger decision into a helper function
Peter Hutterer [Wed, 3 Jun 2015 01:06:54 +0000 (11:06 +1000)]
touchpad: move clickfinger finger decision into a helper function

No functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agotouchpad: replace hardcoded resolution > 1
Peter Hutterer [Wed, 3 Jun 2015 01:30:11 +0000 (11:30 +1000)]
touchpad: replace hardcoded resolution > 1

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agoevdev: remove direct checks for INPUT_PROP_POINTING_STICK
Benjamin Tissoires [Tue, 2 Jun 2015 21:22:42 +0000 (17:22 -0400)]
evdev: remove direct checks for INPUT_PROP_POINTING_STICK

If we need to temporary override a device with ID_INPUT_POINTINGSTICK,
evdev sets the tag EVDEV_TAG_TRACKPOINT to the device. Rely on the tag
to behave properly for scroll emulation.

The dpi information should be retrieved after the device has been
configured or the tag EVDEV_TAG_TRACKPOINT was not set.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoevdev: remove tag_device from evdev_dispatch_interface
Benjamin Tissoires [Tue, 2 Jun 2015 21:22:41 +0000 (17:22 -0400)]
evdev: remove tag_device from evdev_dispatch_interface

Tagging a device should occur only once during configure. We do not
have devices that can be changed after they are configured, so there is no
point in having the tagging part in a deferred struct.
Plus, the note saying that we tag with only one of EVDEV_TAG was wrong.

Now that we are chosing when we call each evdev_tag_*, we can also get
rid of the device->seat_caps tests.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoevdev: always default to the middle button for button-scrolling
Peter Hutterer [Tue, 2 Jun 2015 06:32:41 +0000 (16:32 +1000)]
evdev: always default to the middle button for button-scrolling

The current code only defaulted to the middle button for those devices that
used button scrolling by default, requiring the user to enable button
scrolling _and_ set the button before it is active. This causes some
confusion.

There is no real benefit to leaving the button at 0 when the scroll
method isn't enabled anyway. So always default to the middle button (if
available).

https://bugzilla.redhat.com/show_bug.cgi?id=1227182

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agodoc: add a graphic to explain tap-n-drag
Peter Hutterer [Tue, 2 Jun 2015 05:45:37 +0000 (15:45 +1000)]
doc: add a graphic to explain tap-n-drag

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotouchpad: reduce tap-n-drag timeout to 300ms
Peter Hutterer [Tue, 2 Jun 2015 03:04:44 +0000 (13:04 +1000)]
touchpad: reduce tap-n-drag timeout to 300ms

The current 500ms is too long, reduce it to 300ms instead. This is still long
enough to get multiple movements but not that long that it feels like the
button is stuck.

https://bugs.freedesktop.org/show_bug.cgi?id=90613

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: check getcwd() and system() return values in litest
Jon A. Cruz [Tue, 2 Jun 2015 01:04:59 +0000 (18:04 -0700)]
test: check getcwd() and system() return values in litest

Added code to check for errors in getcwd() and system() that
were previously ignored and silently dropped.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoAdd a CODING_STYLE document
Peter Hutterer [Mon, 1 Jun 2015 23:53:00 +0000 (09:53 +1000)]
Add a CODING_STYLE document

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agofilter: enforce minimum velocity
Peter Hutterer [Wed, 22 Apr 2015 02:25:13 +0000 (12:25 +1000)]
filter: enforce minimum velocity

In the current code, a timeout or direction change on the first tracker will
result in a velocity of 0. Really slow movements will thus always be zero, and
the first event after a direction is swallowed.

Enforce a minimum velocity:
In the case of a timeout, assume the current velocity is that of
distance/timeout. In the case of a direction change, the velocity is simply
that since the last tracker.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agofilter: up the motion timeout to 1 second
Peter Hutterer [Wed, 22 Apr 2015 01:46:57 +0000 (11:46 +1000)]
filter: up the motion timeout to 1 second

This timeout defines how far back in the events we search for velocity
calculations. For really slow movements, 300ms is not enough. It causes the
velocity to be 0 -> accel factor of 0 -> no movement.
As a result, really slow movement does not move the cursor.

Up the timeout to 1 second instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agofilter: pass last_velocity as argument
Peter Hutterer [Thu, 30 Apr 2015 05:23:34 +0000 (15:23 +1000)]
filter: pass last_velocity as argument

Let the caller set the various fields, here we just calculate stuff.
No functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agoevdev: use the button down time for no-scroll middle button press event
Peter Hutterer [Mon, 1 Jun 2015 04:38:29 +0000 (14:38 +1000)]
evdev: use the button down time for no-scroll middle button press event

When we get the release event within the timeout, we send a press + release
event for the middle button. Rather than using the release event's timestamp
for both, remember and use the button press timestamp.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agoconfigure.ac: libinput 0.16.0 0.16.0
Peter Hutterer [Mon, 1 Jun 2015 06:58:37 +0000 (16:58 +1000)]
configure.ac: libinput 0.16.0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agodoc: add a FAQ page
Peter Hutterer [Wed, 27 May 2015 22:57:18 +0000 (08:57 +1000)]
doc: add a FAQ page

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoREADME: add two diagrams to outline the stack
Peter Hutterer [Wed, 27 May 2015 23:33:07 +0000 (09:33 +1000)]
README: add two diagrams to outline the stack

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoCOPYING: note that having linux/input.h in the tree does not make libinput GPL
Peter Hutterer [Wed, 27 May 2015 22:12:33 +0000 (08:12 +1000)]
COPYING: note that having linux/input.h in the tree does not make libinput GPL

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: address gcc warnings on potentially uninitialized variables.
Jon A. Cruz [Sat, 30 May 2015 01:40:25 +0000 (18:40 -0700)]
test: address gcc warnings on potentially uninitialized variables.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoAdd xasprintf to avoid use of undefined pointer values
Jon A. Cruz [Fri, 29 May 2015 02:01:01 +0000 (19:01 -0700)]
Add xasprintf to avoid use of undefined pointer values

If asprintf fails for any reason, the contents of the pointer
are undefined. While some platforms set it to NULL, there is no
guarantee that all will.

This change adds a simple wrapper to ensure proper NULL results
on failure.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Added LIBINPUT_PRINTF attribute and the required declaration for it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoAdd missing config.h includes
Jon A. Cruz [Sun, 31 May 2015 22:09:26 +0000 (08:09 +1000)]
Add missing config.h includes

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoevdev: use the udev ID_INPUT_POINTINGSTICK property upstream/0.15.0+92+gec468e8
Peter Hutterer [Fri, 29 May 2015 01:11:56 +0000 (11:11 +1000)]
evdev: use the udev ID_INPUT_POINTINGSTICK property

Added in systemd 220, but note that for udev backwards compatibility, the
ID_INPUT_POINTINGSTICK tag is set in addition to the ID_INPUT_MOUSE tag.

And use that property to tag a device as trackpoint too, this allows temporary
workarounds for kernel bugs where the input prop isn't set yet.

https://bugzilla.redhat.com/show_bug.cgi?id=1225563

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agotest: add another wait loop for udev
Peter Hutterer [Thu, 28 May 2015 21:29:07 +0000 (07:29 +1000)]
test: add another wait loop for udev

Wait after deleting a device so udev can catch up with everything and the
various hooks to make sure it's happy with any newly created devices after
this.

The sleep is in the delete path to also cover the tests where we manually
create uinput devices rather than using the litest hooks.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agotouchpad: check touchpad for basic features we expect
Peter Hutterer [Thu, 28 May 2015 03:41:58 +0000 (13:41 +1000)]
touchpad: check touchpad for basic features we expect

If a relative device is tagged by udev as ID_INPUT_TOUCHPAD we need to
catch this before we try to dereference device->abs.absinfo_x.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agotools: print symbolic key names too from event-debug
Peter Hutterer [Fri, 29 May 2015 02:13:02 +0000 (12:13 +1000)]
tools: print symbolic key names too from event-debug

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: don't abort if the device filter filtered all devices
Peter Hutterer [Thu, 28 May 2015 03:33:54 +0000 (13:33 +1000)]
test: don't abort if the device filter filtered all devices

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoREADME: spice up the readme a bit
Peter Hutterer [Wed, 27 May 2015 22:04:42 +0000 (08:04 +1000)]
README: spice up the readme a bit

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agodoc: improve the T440 documentation a bit
Peter Hutterer [Thu, 28 May 2015 01:54:34 +0000 (11:54 +1000)]
doc: improve the T440 documentation a bit

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agodoc: add illustrations for clickfinger and software button behavior
Peter Hutterer [Thu, 28 May 2015 00:46:02 +0000 (10:46 +1000)]
doc: add illustrations for clickfinger and software button behavior

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agodoc: add a blurb about scroll sources to the scrolling docs
Peter Hutterer [Wed, 27 May 2015 22:53:00 +0000 (08:53 +1000)]
doc: add a blurb about scroll sources to the scrolling docs

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoUpdate Red Hat's copyright
Peter Hutterer [Wed, 27 May 2015 22:23:59 +0000 (08:23 +1000)]
Update Red Hat's copyright

Updated to 2015 where appropriate, added where missing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotouchpad: add missing break statement
Peter Hutterer [Wed, 27 May 2015 08:29:26 +0000 (18:29 +1000)]
touchpad: add missing break statement

No effect since it was the last case, but it's more correct.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotouchpad: touches after the last key press can be released
Peter Hutterer [Thu, 21 May 2015 06:32:42 +0000 (16:32 +1000)]
touchpad: touches after the last key press can be released

The current code labels a touch as palm if it started within the typing
timeouts. To move the pointer even after the timeout expires, a user has to
lift the finger which is quite annoying and different to the old synaptics
driver behaviour (which had a simple on/off toggle on whether to let events
through or not).

Be smarter about this: if a touch starts _after_ the last key press event,
release it for pointer motion once the timeout expires. Touches started before
the last key press remain labelled as palms. This makes it possible to rest
the palm on the touchpad while typing without getting interference but also
provides a more responsive UI when moving from typing to using the touchpad
normally.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
10 years agotouchpad: don't enable edge palm detection on Wacom touchpads
Peter Hutterer [Mon, 25 May 2015 06:02:56 +0000 (16:02 +1000)]
touchpad: don't enable edge palm detection on Wacom touchpads

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
10 years agotouchpad: reset the touch state when edge scrolling is stopped
Peter Hutterer [Mon, 25 May 2015 01:36:34 +0000 (11:36 +1000)]
touchpad: reset the touch state when edge scrolling is stopped

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
10 years agotouchpad: add palm state debugging
Peter Hutterer [Fri, 22 May 2015 05:14:04 +0000 (15:14 +1000)]
touchpad: add palm state debugging

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
10 years agotouchpad: split disable-while-typing handling into a helper function
Peter Hutterer [Thu, 21 May 2015 03:30:24 +0000 (13:30 +1000)]
touchpad: split disable-while-typing handling into a helper function

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
10 years agotest: add disable-while-typing tests
Peter Hutterer [Thu, 21 May 2015 06:58:27 +0000 (16:58 +1000)]
test: add disable-while-typing tests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
10 years agotouchpad: be finer-grained about when to pair touchpads/keyboard for DWT
Peter Hutterer [Fri, 22 May 2015 06:07:10 +0000 (16:07 +1000)]
touchpad: be finer-grained about when to pair touchpads/keyboard for DWT

Check a couple of easy yes/no definitives that cover most Lenovo laptops,
and avoid false positives on Wacoms.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
10 years agotouchpad: only check keyboards for disable-while-typing
Peter Hutterer [Fri, 22 May 2015 05:51:18 +0000 (15:51 +1000)]
touchpad: only check keyboards for disable-while-typing

The keyboard test is a simple one, if we have the first row of alphabetic
keys, we assume it's a full keyboard.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
10 years agotouchpad: add helper function to get from tp to the libinput context
Peter Hutterer [Fri, 22 May 2015 05:16:31 +0000 (15:16 +1000)]
touchpad: add helper function to get from tp to the libinput context

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
10 years agotouchpad: extend the key blacklist for disable-while-typing
Peter Hutterer [Sun, 24 May 2015 22:48:25 +0000 (08:48 +1000)]
touchpad: extend the key blacklist for disable-while-typing

Alt-tab should not trigger the disable-while-typing timeout, likewise with the
F-keys, multimedia keys, the windows and menu key, etc.

https://bugs.freedesktop.org/show_bug.cgi?id=90613

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
10 years agotouchpad: move disable-while-typing into its own struct
Peter Hutterer [Mon, 25 May 2015 00:07:51 +0000 (10:07 +1000)]
touchpad: move disable-while-typing into its own struct

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
10 years agotest: add an extra loop for slow udev initialization
Peter Hutterer [Tue, 26 May 2015 00:44:16 +0000 (20:44 -0400)]
test: add an extra loop for slow udev initialization

On slower machines, e.g. VMs, udev isn't fast enough to get the properties set
up by the time we're trying to get the device going. This fails when we try to
add the device with libinput_path_add_device().

We know that all litest devices will have ID_INPUT set, so check for that
before we continue.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agoevdev: rename evdev_compare_syspath for clarity
Peter Hutterer [Mon, 25 May 2015 22:49:04 +0000 (08:49 +1000)]
evdev: rename evdev_compare_syspath for clarity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoAdd streq() helper to use instead of strcmp() == 0
Peter Hutterer [Mon, 25 May 2015 22:46:05 +0000 (08:46 +1000)]
Add streq() helper to use instead of strcmp() == 0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: fix coverity complaint about unbounded loop
Peter Hutterer [Mon, 25 May 2015 07:27:14 +0000 (17:27 +1000)]
test: fix coverity complaint about unbounded loop

buffer tainted (from fgets()) so tighten the loop conditions a bit.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: fail if fgets() from addr2line returns NULL
Peter Hutterer [Mon, 25 May 2015 07:04:56 +0000 (17:04 +1000)]
test: fail if fgets() from addr2line returns NULL

Found by Coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: pclose the popened stream
Peter Hutterer [Mon, 25 May 2015 06:50:54 +0000 (16:50 +1000)]
test: pclose the popened stream

Found by Coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: move litest_log/vlog up outside of HAVE_LIBUNWIND
Peter Hutterer [Mon, 25 May 2015 06:38:12 +0000 (16:38 +1000)]
test: move litest_log/vlog up outside of HAVE_LIBUNWIND

Well, the patch looks like the HAVE_LIBUNWIND bit was moved down, which is the
same thing.

litest_log and litest_vlog are called from independent paths, we have a
compiler error otherwise.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoAdd a few more exclusions to .gitignore
Peter Hutterer [Sun, 24 May 2015 23:06:32 +0000 (09:06 +1000)]
Add a few more exclusions to .gitignore

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoAdd .vimdir for libinput-specific settings
Peter Hutterer [Sun, 24 May 2015 23:02:25 +0000 (09:02 +1000)]
Add .vimdir for libinput-specific settings

To avoid introducing broken indentations when I'm working in different
directories than the standard one add the vimdir with the local settings.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: fix --list for the tests
Peter Hutterer [Sun, 24 May 2015 22:56:53 +0000 (08:56 +1000)]
test: fix --list for the tests

The argument worked, but the test list was empty since b2fd428f96.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: fail if the filter leaves us with zero tests
Peter Hutterer [Fri, 22 May 2015 04:56:09 +0000 (14:56 +1000)]
test: fail if the filter leaves us with zero tests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: add missing filter for function names
Peter Hutterer [Fri, 22 May 2015 04:55:24 +0000 (14:55 +1000)]
test: add missing filter for function names

Was added to other places, missing from here so some tests passed the filter
despite not being selected by it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoMerge branch 'litest-filter-tests'
Peter Hutterer [Thu, 21 May 2015 23:06:07 +0000 (09:06 +1000)]
Merge branch 'litest-filter-tests'

The litest-selftest has its own main method and compiles litest.c with special
flags. Use that to ifdef out the litest.c main function, and inline the
litest_run/litest_parse_args functions so gcc doesn't complain about unused
functions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agodoc: drop leftovers of Check's selective test running
Peter Hutterer [Wed, 20 May 2015 01:04:13 +0000 (11:04 +1000)]
doc: drop leftovers of Check's selective test running

CK_RUN_CASE and CK_RUN_SUITE still work because we're still using check
underneath, but it's better to use the arguments.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: add --filter-group argument to match test groups (suites)
Peter Hutterer [Wed, 20 May 2015 01:00:37 +0000 (11:00 +1000)]
test: add --filter-group argument to match test groups (suites)

Same as CK_RUN_SUITE, but supports fnmatch-like globs

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: add --filter-device argument
Peter Hutterer [Wed, 20 May 2015 00:49:13 +0000 (10:49 +1000)]
test: add --filter-device argument

Similar to the CK_RUN_CASE environment variable, but it does support
fnmatch()-style wildcards, e.g.

./test/test-touchpad --filter-device="synaptics*"

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: add filtering to litest framework
Peter Hutterer [Wed, 20 May 2015 00:12:39 +0000 (10:12 +1000)]
test: add filtering to litest framework

Complementary to CK_RUN_SUITE and CK_RUN_CASE, this filters on actual test
function names with a simple fnmatch.

./test/test-touchpad --filter-test="*1fg_tap*"

Most of this patch is renaming litest_add_* to _litest_add_* so we can use the
macros to get at the function names.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agotest: move argument parsing into a separate function
Peter Hutterer [Tue, 19 May 2015 23:46:54 +0000 (09:46 +1000)]
test: move argument parsing into a separate function

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