platform/upstream/libinput.git
9 years agoMerge branch 'filter-us-ms-cleanup'
Peter Hutterer [Sun, 16 Aug 2015 23:27:48 +0000 (09:27 +1000)]
Merge branch 'filter-us-ms-cleanup'

9 years agotest: add a comment
Peter Hutterer [Wed, 27 May 2015 03:02:52 +0000 (13:02 +1000)]
test: add a comment

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotools: add shell script for making the pointer acceleration graphs in the docs
Peter Hutterer [Wed, 5 Aug 2015 04:47:59 +0000 (14:47 +1000)]
tools: add shell script for making the pointer acceleration graphs in the docs

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agodoc: add pointer acceleration documentation
Peter Hutterer [Wed, 29 Jul 2015 05:05:52 +0000 (15:05 +1000)]
doc: add pointer acceleration documentation

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agotools: allow filter-switching in ptraccel-debug
Peter Hutterer [Fri, 31 Jul 2015 02:29:23 +0000 (12:29 +1000)]
tools: allow filter-switching in ptraccel-debug

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agofilter: split trackpoint acceleration out
Peter Hutterer [Tue, 28 Jul 2015 06:02:05 +0000 (16:02 +1000)]
filter: split trackpoint acceleration out

This is step one to fixing trackpoint acceleration, separating it from the
other acceleration code. No functional changes yet, it still uses the low-dpi
accel method.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agofilter: duplicate the code for the Lenovo x230 accel method
Peter Hutterer [Tue, 28 Jul 2015 05:53:23 +0000 (15:53 +1000)]
filter: duplicate the code for the Lenovo x230 accel method

This is "once-tested, don't touch it again" code. The quirks on the touchpad
means we'd have to find that specific device again and re-test everything if
we change anything elsewhere in the code. So duplicate it properly, so that we
don't have to touch it again.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agotouchpad: enable natural scrolling for edge scrolling
Peter Hutterer [Tue, 11 Aug 2015 02:40:45 +0000 (12:40 +1000)]
touchpad: enable natural scrolling for edge scrolling

Instead of going straight to pointer_notify_axis, go through
evdev_notify_axis() which flips the scroll direction around for us.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agofilter: split out handling of the low-dpi accel method
Peter Hutterer [Tue, 28 Jul 2015 05:49:22 +0000 (15:49 +1000)]
filter: split out handling of the low-dpi accel method

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agofilter: split calculating the accel factor into a helper function
Peter Hutterer [Tue, 28 Jul 2015 05:46:33 +0000 (15:46 +1000)]
filter: split calculating the accel factor into a helper function

No functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agofilter: revamp to create device-specific filters, rather than accel functions
Peter Hutterer [Tue, 28 Jul 2015 05:06:13 +0000 (15:06 +1000)]
filter: revamp to create device-specific filters, rather than accel functions

The previous approach to pointer acceleration was to initialize the same
motion filter behavior but a different acceleration profile depending on the
hardware (the profile converts a speed to a multiplier for input deltas).

To be more flexible for hardware-specifics, change this into a set of specific
pointer acceleration init functions. This patch has no effective functional
changes, they're still all the same.

The acceleration functions are kept for direct access by the ptraccel-debug
tool.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agofilter: move create_pointer_accelerator_filter down in the file
Peter Hutterer [Tue, 28 Jul 2015 04:45:51 +0000 (14:45 +1000)]
filter: move create_pointer_accelerator_filter down in the file

No functional changes, just moving code in preparation for filter patches

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agofilter: drop accel->last, write-only value
Peter Hutterer [Tue, 28 Jul 2015 05:39:19 +0000 (15:39 +1000)]
filter: drop accel->last, write-only value

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agofilter: explain the acceleration function in detail
Peter Hutterer [Wed, 5 Aug 2015 03:39:33 +0000 (13:39 +1000)]
filter: explain the acceleration function in detail

And switch to a code-flow that's a bit more self-explanatory than the current
min/max combinations.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agofilter: add two helper functions to convert between speeds
Peter Hutterer [Tue, 4 Aug 2015 06:04:06 +0000 (16:04 +1000)]
filter: add two helper functions to convert between speeds

This makes it more obvious where we're using units/us and units/ms as input
variable and what the output is. Clutters up the code, but still better than
dealing with us/ms differently per function, and still better than carrying
all the 1000.0 multiplications/divisions manually.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agofilter: rename speed_out to "factor" for the touchpad profiles
Peter Hutterer [Tue, 4 Aug 2015 06:01:20 +0000 (16:01 +1000)]
filter: rename speed_out to "factor" for the touchpad profiles

The return value of a profile is a unitless factor, not a speed.
Same applies for s1/s2, these are factors, not speeds.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agofilter: rename speed to speed_adjustment where it's in the [-1,1] range
Peter Hutterer [Tue, 4 Aug 2015 05:48:40 +0000 (15:48 +1000)]
filter: rename speed to speed_adjustment where it's in the [-1,1] range

To avoid confusion with the other speed in units/time

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agofilter: drop superfluous struct declaration
Peter Hutterer [Tue, 4 Aug 2015 05:47:39 +0000 (15:47 +1000)]
filter: drop superfluous struct declaration

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agoRevert "filter: move the pointer acceleration profiles back to units/ms"
Peter Hutterer [Tue, 4 Aug 2015 05:45:53 +0000 (15:45 +1000)]
Revert "filter: move the pointer acceleration profiles back to units/ms"

This reverts commit 8a6825f1602aa9d9c4b29a83d296f55f68b316e0.

Aside from introducing bugs, this doesn't really help with anything, it adds a
requirement to rename everything to make clear where we're using µs and where
we're using ms and that just clutters up the code.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jonas Ådahl <jadahl@gmail.com>
9 years agoevdev: split scroll threshold and direction lock threshold into two
Peter Hutterer [Wed, 5 Aug 2015 00:55:39 +0000 (10:55 +1000)]
evdev: split scroll threshold and direction lock threshold into two

The previous code used a 5mm threshold before axis events were posted. This
threshold was on top of the 2mm 2fg threshold (and timeout handling) in the
gesture code and effectively prevented events from being sent after a timeout,
or in the 2mm-5mm range.

We still want a directional lock though, so split the two out. The default 5mm
threshold is set to 0 for touchpads since we have our own handling of the
threshold there. The directional lock only applies once scrollin has started
and remains on 5mm.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agoudev: use prop_value() to fetch the ID_INPUT_PROP property
Peter Hutterer [Tue, 4 Aug 2015 21:37:03 +0000 (07:37 +1000)]
udev: use prop_value() to fetch the ID_INPUT_PROP property

This will thus work if the property is only set on a parent device, not on the
device directly.

https://github.com/systemd/systemd/issues/763

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agoconfigure.ac: add arg --with-libunwind
Jackie Huang [Wed, 5 Aug 2015 03:28:43 +0000 (11:28 +0800)]
configure.ac: add arg --with-libunwind

Add arg --with-libunwind for configure so it's optional to check
libunwind, which is helpfull to make deterministic builds.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotest: don't try to print axis values that aren't set
Peter Hutterer [Tue, 4 Aug 2015 23:45:45 +0000 (09:45 +1000)]
test: don't try to print axis values that aren't set

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agofilter: fix acceleration threshold assignment
Peter Hutterer [Tue, 4 Aug 2015 05:08:25 +0000 (15:08 +1000)]
filter: fix acceleration threshold assignment

The new values were in units/us and didn't make the switch back to ms in
8a6825f1602.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agomiddle-button: don't call libinput_now() in the timeout handler
Peter Hutterer [Mon, 3 Aug 2015 04:38:38 +0000 (14:38 +1000)]
middle-button: don't call libinput_now() in the timeout handler

The argument has "now" already

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agoconfigure.ac: libinput 0.21.0 0.21.0
Peter Hutterer [Tue, 4 Aug 2015 00:09:43 +0000 (10:09 +1000)]
configure.ac: libinput 0.21.0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agoudev: include new udev rule in EXTRA_DIST
Peter Hutterer [Tue, 4 Aug 2015 00:25:47 +0000 (10:25 +1000)]
udev: include new udev rule in EXTRA_DIST

Fixes distcheck

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotouchpad: always enable the bottom-most area for thumb detection
Peter Hutterer [Tue, 28 Jul 2015 03:25:45 +0000 (13:25 +1000)]
touchpad: always enable the bottom-most area for thumb detection

If the touchpad is higher than 50mm, enable bottom area thumb detection. This
only applies to the bottom-most 8mm and only if the touch remains unmoving in
that area.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agogestures: reduce 2fg scroll timeout to 500ms
Peter Hutterer [Mon, 3 Aug 2015 05:08:57 +0000 (15:08 +1000)]
gestures: reduce 2fg scroll timeout to 500ms

Holding the fingers in place without moving for 500ms is long enough to lock
in a scroll gesture, especially while we're still waiting for the rest of the
stack to expose pinch gestures.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agodoc: add a page about touchpads
Peter Hutterer [Mon, 3 Aug 2015 04:28:43 +0000 (14:28 +1000)]
doc: add a page about touchpads

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agoMerge branch 'disable-gestures-semi-mt'
Peter Hutterer [Mon, 3 Aug 2015 01:40:37 +0000 (11:40 +1000)]
Merge branch 'disable-gestures-semi-mt'

9 years agotouchpad: pretend the jumpy semi-mt touchpad is a single-touch touchpad
Peter Hutterer [Thu, 30 Jul 2015 01:54:38 +0000 (11:54 +1000)]
touchpad: pretend the jumpy semi-mt touchpad is a single-touch touchpad

The first finger is accurate, it's just the second finger that is imprecise,
so we can't handle it as a true touch. Instead, revert the device back to
being a single-touch touchpad and use the fake touch bits for second finger
handling.

Two-finger scrolling thus becomes usable though we will lose out on
other features like thumb detection. Useful scrolling trumps that though.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: elantech touchpads can use a 2mm gesture motion threshold
Peter Hutterer [Thu, 30 Jul 2015 01:46:13 +0000 (11:46 +1000)]
touchpad: elantech touchpads can use a 2mm gesture motion threshold

Unlike ALPS and Synaptics semi-mt touchpads, the Elantech touchpads appear to
be precise enough to allow a smaller motion threshold before we decide on the
type of gesture (pinch vs scroll).

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: disable gestures on Synaptics semi-mt touchpads
Peter Hutterer [Thu, 30 Jul 2015 01:07:58 +0000 (11:07 +1000)]
touchpad: disable gestures on Synaptics semi-mt touchpads

Follow-up to eb146677e, if we disable 2fg scrolling on those touchpads we
should also disable gestures. The data doesn't magically become more useful.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: make gestures optional
Peter Hutterer [Thu, 30 Jul 2015 00:48:39 +0000 (10:48 +1000)]
touchpad: make gestures optional

Not all multi-finger touchpads are able to reliably produce gestures, so make
it optional. This patch just adds a boolean (currently always true) that gets
set on touchpad init time, i.e. it is not run-time configurable.

Three and four-finger gestures are filtered out in gesture_notify(), if the
cap isn't set the event is discarded.

For two-finger gestures we prevent a transition to PINCH, so we don't
inadvertently detect a pinch gesture and then not send events. This way, a 2fg
gesture is always scroll.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotest: fix test case failure caused by belated timer
Peter Hutterer [Fri, 31 Jul 2015 06:50:02 +0000 (16:50 +1000)]
test: fix test case failure caused by belated timer

See 5cec16eede70f6df44b1c39faae614a66594d774

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agofilter: move the pointer acceleration profiles back to units/ms
Peter Hutterer [Fri, 31 Jul 2015 04:52:56 +0000 (14:52 +1000)]
filter: move the pointer acceleration profiles back to units/ms

There is no need here to use µs since we're just handling speeds/thresholds,
not actual events where a ms granularity can be too high.

Moving back to ms lets us drop a bunch of zeroes that clutter up the code, and
since the acceleration functions are a bit magic anyway, having the various
1000.0 factors in there makes it even less obvious.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agofilter: fix x230 acceleration function for the ms→us change
Peter Hutterer [Fri, 31 Jul 2015 04:49:30 +0000 (14:49 +1000)]
filter: fix x230 acceleration function for the ms→us change

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agotools: fix the velocity range for printing the ptraccel profile
Peter Hutterer [Fri, 31 Jul 2015 02:41:12 +0000 (12:41 +1000)]
tools: fix the velocity range for printing the ptraccel profile

Now using µs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agotouchpad: move CAP_GESTURE assignment to the touchpad code
Peter Hutterer [Thu, 30 Jul 2015 00:43:30 +0000 (10:43 +1000)]
touchpad: move CAP_GESTURE assignment to the touchpad code

That's where we set the pointer cap too.
No functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotest: move the helper functions to the litest.h file
Peter Hutterer [Thu, 30 Jul 2015 04:48:12 +0000 (14:48 +1000)]
test: move the helper functions to the litest.h file

To avoid duplication

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agodoc: add a page on how to report bugs
Peter Hutterer [Thu, 30 Jul 2015 01:11:12 +0000 (11:11 +1000)]
doc: add a page on how to report bugs

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotouchpad: drop distance threshold to detect pinches
Peter Hutterer [Tue, 28 Jul 2015 02:54:16 +0000 (12:54 +1000)]
touchpad: drop distance threshold to detect pinches

This gives us too many false positives of 2fg scroll being detected as pinch
gesture. Reporter in [1] uses index+ring finger and thus exceeds the distance
easily (that's admittedly a special case).

This is worsed by the lack of a client stack that handles the gestures. User's
don't see that they're inadvertently performing a gesture, they just see 2fg
scroll not working.

Drop the distance for now, once we have a ubiquitous client stack we can
revisit and bring it back.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1246868

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agogestures: check ntouches, not just num_slots for the number of fingers
Peter Hutterer [Wed, 29 Jul 2015 07:12:53 +0000 (17:12 +1000)]
gestures: check ntouches, not just num_slots for the number of fingers

We need to check fake fingers as well as real fingers, especially for
two-finger scrolling on single-touch touchpads with BTN_TOOL_DOUBLETAP.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotest: abort if we trigger a libinput bug message
Peter Hutterer [Wed, 29 Jul 2015 06:06:20 +0000 (16:06 +1000)]
test: abort if we trigger a libinput bug message

Only abort on client or libinput bugs, skip over kernel bugs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agotest: add missing libinput_dispatch() before timeouts
Peter Hutterer [Wed, 29 Jul 2015 06:29:46 +0000 (16:29 +1000)]
test: add missing libinput_dispatch() before timeouts

see 5cec16eede70.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agotouchpad: update the thumb move timeout to µs
Peter Hutterer [Wed, 29 Jul 2015 01:00:17 +0000 (11:00 +1000)]
touchpad: update the thumb move timeout to µs

And add a #define for it so we stop hiding it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agotest: add a bunch of libinput_dispatch() before timeout calls
Peter Hutterer [Tue, 28 Jul 2015 23:52:28 +0000 (09:52 +1000)]
test: add a bunch of libinput_dispatch() before timeout calls

98346f6a1aa added a warning about timeouts expiring before now. Those warnings
are triggered by a bunch of tests where we have events, then a timeout, then a
libinput_dispatch().

All these are bugs in the test, since we can't guarantee the order of fds (and
thus which fd the events are pulled off first) it's just lucky that they worked.
Insert the required libinput_dispatch() calls.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
9 years agotouchpad: log when thumb detection is enabled on a device
Peter Hutterer [Tue, 28 Jul 2015 03:09:52 +0000 (13:09 +1000)]
touchpad: log when thumb detection is enabled on a device

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agoIgnore test devices for libinput contexts not run from the test suite
Jonas Ådahl [Mon, 27 Jul 2015 08:08:04 +0000 (16:08 +0800)]
Ignore test devices for libinput contexts not run from the test suite

Add a LIBINPUT_TEST_DEVICE udev parameter to test devices created by
the test suite. When an application tries to add such a device to the
path backend or when the udev backend discovers such a device, it will
be ignored. Only the context when run via the test suite will actually
handle these devices.

Doing this will enable a user to run the libinput test suite on a system
running libinput without having the test suite devices interfering with
the actual system.

Note that X.org users running an input device driver that is not the
libinput X input driver will still need to manually configure the X
server to ignore such devices (see test/50-litest.conf).

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotest: Make udev path variables more explicitly named
Jonas Ådahl [Mon, 27 Jul 2015 07:53:53 +0000 (15:53 +0800)]
test: Make udev path variables more explicitly named

This is to make room for more types of rules files.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agoChange to micro seconds for measuring time internally
Jonas Ådahl [Mon, 27 Jul 2015 09:51:52 +0000 (17:51 +0800)]
Change to micro seconds for measuring time internally

In order to provide higher precision event time stamps, change the
internal time measuring from milliseconds to microseconds.
Microseconds are chosen because it is the most fine grained time stamp
we can get from evdev.

The API is extended with high precision getters whenever the given
information is available.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotimer: Warn about negative timer offsets
Jonas Ådahl [Mon, 27 Jul 2015 09:26:20 +0000 (17:26 +0800)]
timer: Warn about negative timer offsets

Even if it may be caused by extreme stalls, warn if the timer was set to
be triggered even before 'now' when it actually is triggered, as it is
more likely a programming error.

Part of the reason for this commit was not to convert the unsigned int
to a signed int (which abs() does).

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotest/pointer: Don't rely on velocities in direction change test
Jonas Ådahl [Mon, 27 Jul 2015 03:54:18 +0000 (11:54 +0800)]
test/pointer: Don't rely on velocities in direction change test

We currently rely on an extra millisecond being added by the filter
code to get a velocity that are small enough to not hit the max
acceleration limit. If this arbitrary millisecond is changed (for
example by changing the internal time measurment to microseconds and
adding just a microsecond instead), the velocity may change so that the
maximum or minimum acceleration is always hit.

Adding a delay to the test won't work either since it would not only rely
on ending up within the acceleration limits but there would also be an
non-deterministic actual delay causing the velocity of the movement
after the direction change to be potentially larger than the movement
in the original direction due to the actual time delta in libinput will
not always be 1ms.

To fix the test to not rely on any artificial delays in the filter code
nor any non-deterministic delays in the test, lets just test that the
direction change of the hardware events resulted in a direction change
of the libinput motion events.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agoAlways use uint64_t for internal timestamp values
Jonas Ådahl [Mon, 27 Jul 2015 03:52:44 +0000 (11:52 +0800)]
Always use uint64_t for internal timestamp values

In most places we use 64 bit unsigned integers; lets be consistent and
use it everywhere.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotest: Use ck_assert_double_ for checking doubles in some places
Jonas Ådahl [Thu, 23 Jul 2015 07:23:30 +0000 (15:23 +0800)]
test: Use ck_assert_double_ for checking doubles in some places

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotouchpad: disable 2fg scrolling on Synaptics semi-mt touchpads
Peter Hutterer [Tue, 14 Jul 2015 00:27:46 +0000 (10:27 +1000)]
touchpad: disable 2fg scrolling on Synaptics semi-mt touchpads

These touchpads have a terrible resolution when two fingers are down, causing
scrolling to jump around a lot. That then turns into bug reports that we can't
do much about, the data is simply garbage.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: don't check clickfinger distance for three fingers
Peter Hutterer [Thu, 23 Jul 2015 06:06:48 +0000 (16:06 +1000)]
touchpad: don't check clickfinger distance for three fingers

It's reasonable to expect a thumb (or the other hand's index finger) to click
a button while a finger is down for movement. It's less reasonable to expect
this when two fingers are interacting with the touchpad, or when two fingers
click the touchpad (even on a large touchpad that's an awkward position).

Simplify the clickfinger detection mechanism - if we have three touches down,
it's always a three-finger click. Two fingers may be a right click or a index
+ thumb click.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotest: don't leak the custom udev rule path for devices with custom creates
Peter Hutterer [Mon, 27 Jul 2015 00:54:36 +0000 (10:54 +1000)]
test: don't leak the custom udev rule path for devices with custom creates

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotest: rename 2fg natural scroll test to be more obvious
Peter Hutterer [Mon, 27 Jul 2015 00:25:55 +0000 (10:25 +1000)]
test: rename 2fg natural scroll test to be more obvious

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotest: enable 2fg scrolling before tests that rely on it
Peter Hutterer [Mon, 27 Jul 2015 00:32:28 +0000 (10:32 +1000)]
test: enable 2fg scrolling before tests that rely on it

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotest: filter out edge-scroll-only touchpads from 2fg scroll tests
Peter Hutterer [Mon, 27 Jul 2015 00:24:32 +0000 (10:24 +1000)]
test: filter out edge-scroll-only touchpads from 2fg scroll tests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotouchpad: don't log a bug for Apple's one-button touchpads
Peter Hutterer [Sun, 26 Jul 2015 23:19:21 +0000 (09:19 +1000)]
touchpad: don't log a bug for Apple's one-button touchpads

Apple used to have a single-button touchpad that was not a clickpad. Skip
logging an error for that one.

Found in https://bugzilla.redhat.com/show_bug.cgi?id=1246651.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agoMerge branch 'thumb-detect-improvements'
Peter Hutterer [Thu, 23 Jul 2015 23:19:08 +0000 (09:19 +1000)]
Merge branch 'thumb-detect-improvements'

9 years agotouchpad: put a movement threshold on thumb detection
Peter Hutterer [Wed, 22 Jul 2015 01:53:22 +0000 (11:53 +1000)]
touchpad: put a movement threshold on thumb detection

If a thumb moves around, it's not resting and we should consider it a normal
touch.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: a pressure change alone needs touch processing, mark as dirty
Peter Hutterer [Wed, 22 Jul 2015 02:24:47 +0000 (12:24 +1000)]
touchpad: a pressure change alone needs touch processing, mark as dirty

A thumb may not move, but may change pressure so we need to process
accordingly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotest: fix default axis value assignment
Peter Hutterer [Wed, 22 Jul 2015 02:22:33 +0000 (12:22 +1000)]
test: fix default axis value assignment

Was assigned to -1 if no custom axes were provided.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotest: only run 3-slot test for touchpads with three slots
Peter Hutterer [Tue, 21 Jul 2015 23:21:13 +0000 (09:21 +1000)]
test: only run 3-slot test for touchpads with three slots

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: only try thumb detection in the lowest 15/8mm
Peter Hutterer [Fri, 17 Jul 2015 01:17:22 +0000 (11:17 +1000)]
touchpad: only try thumb detection in the lowest 15/8mm

That's the most likely area it will be resting in, if it's sitting anywhere
above that it's likely part of an interaction.

A thumb in the lowest 15mm needs to trigger the pressure threshold before it's
labelled a thumb. A thumb in the lowest 8mm is considered a thumb if it
remains there for 300ms. Regardless of the pressure, since we can't reliably
get pressure here. If a thumb moves out of the area, or starts outside of that
area it is never a thumb.

If edge scrolling is enabled, the 8mm threshold is ineffective since we'll
have normal interaction in that zone for horizontal scrolling.

The thumb tests now require all touchpads to be switched to clickfinger, if we
test for thumb detection on the bottom of the pad we won't get expected
motion events due to the software button area.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: hook up disable-while-typing configuration
Peter Hutterer [Wed, 8 Jul 2015 22:14:35 +0000 (08:14 +1000)]
touchpad: hook up disable-while-typing configuration

This is not a frequent toggle, so we don't need to jump through too many hoops
here. We simply enable/disable on command and once any current timeouts have
expired the new setting takes effect.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agoAdd a configuration interface for enabling/disabling disable-while-typing
Peter Hutterer [Wed, 8 Jul 2015 05:03:06 +0000 (15:03 +1000)]
Add a configuration interface for enabling/disabling disable-while-typing

DWT can interfere with some applications where keyboard and touchpad use at
the same time is common, e.g. games but also anything that requires a
combination of frequent pointer motion and use of keyboard shortcuts.

Expose a toggle to disable DWT where needed.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: drop TOUCHPAD_HAS_TRACKPOINT_BUTTONS parsing
Peter Hutterer [Thu, 23 Jul 2015 04:27:59 +0000 (14:27 +1000)]
touchpad: drop TOUCHPAD_HAS_TRACKPOINT_BUTTONS parsing

This was a stopgap measure to support the Lenovo Carbon X1 3rd and the Lenovo
*50 series. These devices have the trackpoint buttons wired to the touchpad
and thus trackpoint events came from the touchpad device.

This was fixed in the kernel commit cdd9dc195916ef5644cfac079094c3c1d1616e4c,
the systemd hwdb to set this property was removed in 05304592457e01 so nothing
sets this property anymore. Drop it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotest: split button tests into separate binary
Peter Hutterer [Thu, 23 Jul 2015 01:29:32 +0000 (11:29 +1000)]
test: split button tests into separate binary

We're again hitting the fork ulimits again (see also 9c2afae14) causing test
case failures in the valgrind run of the touchpad test.
Split out the touchpad button tests so we don't require special ulimits on
test boxes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotest: only initialize the generic rules/hwdb once
Peter Hutterer [Wed, 22 Jul 2015 00:44:44 +0000 (10:44 +1000)]
test: only initialize the generic rules/hwdb once

Installing the udev rules and reloading udevadm takes around 150ms each
time. For test-pointer alone (currently 336 tests) this adds almost a
minute to the runtime.
The model quirks and libinput udev rules don't change, so installing them once
at the start of the test run is sufficient.

Unfortunately, now that we're not as slow anymore to initialize, we need to
up the maximum wait time for the path device to wait for a udev device to
initialize.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agoMerge branch 'edge-scroll-on-edge-only'
Peter Hutterer [Thu, 23 Jul 2015 04:50:03 +0000 (14:50 +1000)]
Merge branch 'edge-scroll-on-edge-only'

9 years agoMerge branch 'serial-synaptics-cursor-jump'
Peter Hutterer [Thu, 23 Jul 2015 00:34:03 +0000 (10:34 +1000)]
Merge branch 'serial-synaptics-cursor-jump'

9 years agoMerge branch 'reduce-motion-thresholds'
Peter Hutterer [Thu, 23 Jul 2015 00:28:49 +0000 (10:28 +1000)]
Merge branch 'reduce-motion-thresholds'

9 years agotouchpad: only edge-scroll while the finger is in the edge area
Peter Hutterer [Mon, 13 Jul 2015 04:14:42 +0000 (14:14 +1000)]
touchpad: only edge-scroll while the finger is in the edge area

When the touch leaves the area for edge scrolling after starting to scroll,
discard any movement. This signals to the user that they've left the area and
forces them to lift the finger to switch back to motion. If the finger moves
back into the area, scrolling continues.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: make the edge-scroll edge 7mm wide
Peter Hutterer [Mon, 13 Jul 2015 02:56:39 +0000 (12:56 +1000)]
touchpad: make the edge-scroll edge 7mm wide

Rather than magic percentages of the touchpad axis ranges, make it a fixed
size of 7mm.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotest: enable 2fg scrolling on most palm tests
Peter Hutterer [Tue, 14 Jul 2015 01:30:50 +0000 (11:30 +1000)]
test: enable 2fg scrolling on most palm tests

edge scrolling disables some palm detection, so we can't run those tests when
active. That fell through the cracks so far, all devices with edge scroll by
default were too small to enable palm detection.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotest: fix hover test to avoid the edge scroll zone
Peter Hutterer [Tue, 14 Jul 2015 02:06:03 +0000 (12:06 +1000)]
test: fix hover test to avoid the edge scroll zone

On the synaptics hover device where this test is run, we'd eventually get into
the edge scroll zone. When edge scrolling is enabled this causes the test to
fail.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotouchpad: reset the motion history during/after a slots->nfake crossover
Peter Hutterer [Mon, 20 Jul 2015 03:10:29 +0000 (13:10 +1000)]
touchpad: reset the motion history during/after a slots->nfake crossover

Whenever we cross from N slots to at least one fake finger, reset the motion
history and skip the next event too. Especially on serial Synaptics touchpads,
the first touch update after a two-slot → TRIPLETAP is garbage, as is the one
from TRIPLETAP → two slots.

Example sequence reproduce on a T440s:

E: 4.488757 0003 003a 0084      # EV_ABS / ABS_MT_PRESSURE      84
E: 4.488757 0003 002f 0001      # EV_ABS / ABS_MT_SLOT          1
E: 4.488757 0003 0039 0433      # EV_ABS / ABS_MT_TRACKING_ID   433
E: 4.488757 0003 0035 2500      # EV_ABS / ABS_MT_POSITION_X    2500
E: 4.488757 0003 0036 3064      # EV_ABS / ABS_MT_POSITION_Y    3064
E: 4.488757 0003 003a 0060      # EV_ABS / ABS_MT_PRESSURE      60
E: 4.488757 0003 0018 0084      # EV_ABS / ABS_PRESSURE         84
E: 4.488757 0001 0145 0000      # EV_KEY / BTN_TOOL_FINGER      0
E: 4.488757 0001 014e 0001      # EV_KEY / BTN_TOOL_TRIPLETAP   1
E: 4.488757 0000 0000 0000      # ------------ SYN_REPORT (0) ----------
E: 4.508506 0003 002f 0000      # EV_ABS / ABS_MT_SLOT          0
E: 4.508506 0003 0036 2982      # EV_ABS / ABS_MT_POSITION_Y    2982
E: 4.508506 0003 003a 0086      # EV_ABS / ABS_MT_PRESSURE      86
E: 4.508506 0003 002f 0001      # EV_ABS / ABS_MT_SLOT          1
E: 4.508506 0003 0035 3464      # EV_ABS / ABS_MT_POSITION_X    3464
E: 4.508506 0003 0036 2716      # EV_ABS / ABS_MT_POSITION_Y    2716
E: 4.508506 0003 0001 2982      # EV_ABS / ABS_Y                2982
E: 4.508506 0003 0018 0086      # EV_ABS / ABS_PRESSURE         86
E: 4.508506 0000 0000 0000      # ------------ SYN_REPORT (0) ----------

subsequent events then hover around the 3464 mark, but that initial jump is
enough to cause a massive cursor jump.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Hallelujah-expressed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: handle serial synaptics slot confusion on TRIPLETAP
Peter Hutterer [Thu, 16 Jul 2015 23:30:03 +0000 (09:30 +1000)]
touchpad: handle serial synaptics slot confusion on TRIPLETAP

Synatics touchpads only have 2 slots, but support TRIPLETAP and above. When
the third finger touches, the kernel may end the second slot and re-start it
with the coordinates of the third touch in the next frame. The event sequence
is something like:

ABS_MT_SLOT          0
ABS_MT_POSITION_X    4000
ABS_MT_POSITION_Y    4000
ABS_MT_PRESSURE      78
ABS_MT_SLOT          1
ABS_MT_TRACKING_ID   -1

ABS_X                4000
ABS_Y                4000
ABS_PRESSURE         78
BTN_TOOL_DOUBLETAP   0
BTN_TOOL_TRIPLETAP   1
--- SYN_REPORT (0) ----------
ABS_MT_SLOT          0
ABS_MT_POSITION_X    4000
ABS_MT_POSITION_Y    4000
ABS_MT_PRESSURE      78
ABS_MT_SLOT          1
ABS_MT_TRACKING_ID   55
ABS_MT_POSITION_X    2000
ABS_MT_POSITION_Y    2000
ABS_MT_PRESSURE      72

ABS_X                4000
ABS_Y                4000
ABS_PRESSURE         78
--- SYN_REPORT (0) ----------

libinput usually ignores any BTN_TOOL_* <= num_slots since we expect
that the slot values are valid. Make an exception for the serial synaptics
touchpads. If a touch has ended when the fake touch goes above active-slots
(but still within num-slots), move that touch back to UPDATE. This ensures the
right number of nfingers_down. When the touch restarts again in the next
frame, tp_begin_touch() will skip over re-initializing it because it's already
in UPDATE anyway.

Note that at this point this only handles the transition _to_ TRIPLETAP, not
from TRIPLETAP to DOUBLETAP. Need to wait for this to be seen in the wild
first.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Hallelujah-expressed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agoTag synaptics serial touchpads with a LIBINPUT_MODEL tag
Peter Hutterer [Thu, 16 Jul 2015 06:05:48 +0000 (16:05 +1000)]
Tag synaptics serial touchpads with a LIBINPUT_MODEL tag

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Hallelujah-expressed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agoevdev: allow for multiple LIBINPUT_MODEL_* flags per device
Peter Hutterer [Thu, 16 Jul 2015 05:59:01 +0000 (15:59 +1000)]
evdev: allow for multiple LIBINPUT_MODEL_* flags per device

On some devices we need to set more than one flag, i.e. make it into actual
flags.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Hallelujah-expressed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotest: only run 3-slot test for touchpads with three slots
Peter Hutterer [Tue, 21 Jul 2015 23:21:13 +0000 (09:21 +1000)]
test: only run 3-slot test for touchpads with three slots

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agoMove CASE_RETURN_STRING to libinput-util.h
Peter Hutterer [Mon, 20 Jul 2015 04:37:37 +0000 (14:37 +1000)]
Move CASE_RETURN_STRING to libinput-util.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotouchpad: scale thumb pressure threshold with the resolution
Peter Hutterer [Mon, 20 Jul 2015 00:27:29 +0000 (10:27 +1000)]
touchpad: scale thumb pressure threshold with the resolution

On touchpads with a higher resolution we also see higher pressure values.
Scale accordingly, but use the T440s as reference and don't go below that
device's threshold. A false positive is worse than a false negative when it
comes to thumb detection.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: use the top-most touch for fake finger positions
Peter Hutterer [Fri, 17 Jul 2015 06:40:50 +0000 (16:40 +1000)]
touchpad: use the top-most touch for fake finger positions

The average human hand has four fingers but only one thumb, i.e. the chance of
a fake finger being close to the top-most touch is higher than to whatever the
first touch was (which may be a thumb at the bottom of the touchpad).
So search for the top-most real touch and copy its position into the fake
touches.

This also fixes another bug with the previous code - the first slot may not be
active but we still used its position for the fake touches. Whether that was
really triggerable is questionable though.

The test is only run for the T440 touchpad - we know it's big enough to
enable thumb detection and that way we don't have to double-check in the how
big the touchpad is, etc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: ignore thumbs when counting clickfingers
Peter Hutterer [Fri, 17 Jul 2015 06:38:16 +0000 (16:38 +1000)]
touchpad: ignore thumbs when counting clickfingers

We may have four fingers on the touchpad - three real ones + a thumb. Count it
as three-finger click then.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: 4-finger clickfingers are middle button clicks
Peter Hutterer [Tue, 21 Jul 2015 22:48:03 +0000 (08:48 +1000)]
touchpad: 4-finger clickfingers are middle button clicks

If a thumb is resting with a three-finger click, that must be a middle-click.
And the odd case where we have a real four-finger click doesn't need worrying
about.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: only enable thumb detection on clickpads
Peter Hutterer [Mon, 20 Jul 2015 06:01:32 +0000 (16:01 +1000)]
touchpad: only enable thumb detection on clickpads

The use-case we have thumb detection for is to let a user rest a thumb on the
touchpad before clicking. On a touchpad with physical buttons, the thumb won't
be resting on the touchpad.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: skip thumb detection for touchpads smaller than 50mm
Peter Hutterer [Fri, 17 Jul 2015 01:29:40 +0000 (11:29 +1000)]
touchpad: skip thumb detection for touchpads smaller than 50mm

Gets a bit cramped if you're trying to rest the thumb on a touchpad that
small.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agoMove CASE_RETURN_STRING to libinput-util.h
Peter Hutterer [Mon, 20 Jul 2015 04:37:37 +0000 (14:37 +1000)]
Move CASE_RETURN_STRING to libinput-util.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agotouchpad: reduce unpin threshold to 1.5mm
Peter Hutterer [Mon, 20 Jul 2015 01:24:17 +0000 (11:24 +1000)]
touchpad: reduce unpin threshold to 1.5mm

3mm is too large, it makes the touchpad feel sluggish. We already take fuzz
into account through the hysteresis and the real issue we have with the
pointer moving on a click is _before_ the BTN_LEFT event comes in, not after.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotouchpad: reduce 2fg scroll threshold to 2mm
Peter Hutterer [Mon, 20 Jul 2015 01:13:55 +0000 (11:13 +1000)]
touchpad: reduce 2fg scroll threshold to 2mm

3mm is too large, especially on fine-grained scroll motions. Since we
already use the hysteresis to defuzz the current touchpad point, having a
slower threshold here should not cause any adverse motions.

This affects the pinch gestures too and needs a minor test adjustment. The
atmel hover device's resolution is low enough that we trigger a >1 degree
angle now, make the movement a bit more finegrained.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
9 years agotools: handle the initial set of events at event-gui's startup
Peter Hutterer [Tue, 21 Jul 2015 01:53:57 +0000 (11:53 +1000)]
tools: handle the initial set of events at event-gui's startup

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agoevdev: restore pointing stick const accel property parsing
Peter Hutterer [Mon, 20 Jul 2015 23:33:47 +0000 (09:33 +1000)]
evdev: restore pointing stick const accel property parsing

Regression introduced in 8302860.

Reading the DPI before evdev_configure_device makes it lose on the trackpoint
flag, causing libinput to ignore the POINTINGSTICK_CONST_ACCEL property.

8302860 moved it up so we can init accel based on the DPI, this patch simply
moves istart t before the acceleration is initialized.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agoMark internal log functions with attribute(printf)
Peter Hutterer [Tue, 21 Jul 2015 01:01:39 +0000 (11:01 +1000)]
Mark internal log functions with attribute(printf)

And fix all the places where we passed in garbage.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
9 years agoevdev: log a trackpoint const accel setting
Peter Hutterer [Mon, 20 Jul 2015 21:31:36 +0000 (07:31 +1000)]
evdev: log a trackpoint const accel setting

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