Commit graph

2545 commits

Author SHA1 Message Date
Peter Hutterer
d187ef44aa test: undef ck_assert_double before redefining it
check 0.11 has those macros, but they don't work the same way as our homemade
ones. So for now just #undef them

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04 12:43:38 +10:00
Peter Hutterer
fc470291f1 Merge branch 'wip/touchpad-tap-timestamps' 2017-05-04 11:51:36 +10:00
Peter Hutterer
61452d80c6 lid: fix some indentation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-03 21:08:14 +10:00
Marcos Paulo de Souza
8584c044da touchpad: make use of use tp_for_each_touch
Instead of reimplementing a for loop every time.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-03 12:38:15 +10:00
Peter Hutterer
b4f9d7a6b5 doc: fix doxygen group for libinput_event_tablet_pad_get_time
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 15:35:52 +10:00
Peter Hutterer
2d032019b6 doc: document the event timestamps
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 15:32:19 +10:00
Paul Kocialkowski
46af543b49 udev: Add specific pressure range for the ASUS ZenBook UX21E
This adds specific pressure range values for the Elantech touchpad
found in the ASUS ZenBook UX21E.

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

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 10:37:52 +10:00
Paul Kocialkowski
1dfedc6995 udev: Select more generic pressure range values for Elantech touchpads
The current pressure values for Elantech touchpads are too high for
various devices and make the touchpad almost unusable on them.

Decreasing the pressure range values makes those devices usable again.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 10:37:49 +10:00
Paul Kocialkowski
6af9f8e5fb udev: Remove unused Elantech touchpad model binding
The Elantech touchpad model binding in udev is currently unused, since
pressure values were moved to a udev binding of their own.

This gets rid of the deprecated model binding.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 10:37:44 +10:00
Peter Hutterer
2b867feab7 Put a check in to make sure our events have correct timestamps
This is for debugging purposes only, we cannot guarantee that event timestamps
always go up - at least not across devices. Example: tapping on a touchpad may
delay an event until a timeout expires, but that event is then sent with the
original touch timestamps (i.e. in the past). If any other device produces
events during that timeout period, our timestamps are out-of-order.

This isn't really a bug because we are forced to do that, but for bug-fixing
it can be useful to detect.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-28 16:47:38 +10:00
Peter Hutterer
ea4332a6cf touchpad: add touch state debugging helper
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-28 15:37:00 +10:00
Peter Hutterer
691aea6d06 touchpad: for 2/3-finger tap, use the last finger down as press time
This makes the tapping times shorter and hopefully more obvious. It also fixes
a bug where repeated tripletap (by tapping with one finger while leaving the
other two down) could cause incorrect timestamps.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-28 15:37:00 +10:00
Peter Hutterer
4c0b8ba4c2 touchpad: send multitap button events with the correct timestamps
For multitap, we're one tap behind with the button clicks, i.e. we send the
first full click button on the second tap, etc. Remember the timestamps of the
touches so we can send the events with the right timestamps. This makes
tapping more accurate because the time between taps and various timeouts
matter less for double-click detection.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-28 15:37:00 +10:00
Peter Hutterer
68ed1b96a8 test: enable drag lock for multitap tests
Without this enabled, we stay in the single/double tap part of the state
machine and a triple tap is just a double tap followed by a single tap.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-28 15:37:00 +10:00
Peter Hutterer
e461f21c52 touchpad: fix the button timestamps for double/tripletap
Both events had the same timestamp but we have the timestamp from the original
event - use it.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-28 15:11:30 +10:00
Peter Hutterer
8a626394c9 doc: add a faq for synclient/syndaemon
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-28 10:12:29 +10:00
Peter Hutterer
3ecdab130a Merge branch 'wip/touchpad-custom-pressure-values' 2017-04-26 12:38:28 +10:00
Peter Hutterer
fe4e2aef04 touchpad: drop the unused touchpad_model enum
A leftover from synaptics where we do this detection in the driver. libinput
pushes this to the hwdb and sets the model flags accordingly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 12:38:15 +10:00
Peter Hutterer
bed7e62a0d doc: add documentation for touchpad pressure detection
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 12:38:15 +10:00
Peter Hutterer
8d5f4decb4 touchpad: move the pressure range to a hwdb entry
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 12:38:15 +10:00
Peter Hutterer
97d3ddb070 Merge branch 'wip/touchpad-mt-tool-palm' 2017-04-26 12:23:24 +10:00
Peter Hutterer
2d96d8f97c configure.ac: quote the xyes for the libunwind check
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 09:23:00 +10:00
Peter Hutterer
577bd60e39 configure.ac: move some checks out of the libwacom section
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 09:22:58 +10:00
Peter Hutterer
938aa25843 Rename README to README.md, include properly from doxygen
As of doxygen 1.8.3 (Dec 2012) doxygen can include a README.md directly as
mainpage. This avoids the ugly doxygen bits we have in the current README.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-25 10:56:51 +10:00
Peter Hutterer
7b9aa96d02 Add doc to discourage use of libinput_device_get_output_name()
This is a leftover from when libinput was part of weston and we could
interpret properties correctly. Realistically, the only way this could work
with libinput as external library is if we define precisely what the
definition of an output is. Practically, it's a lot easier to just throw up
our hands and leave it all to the caller.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-04-25 10:56:48 +10:00
Peter Hutterer
555ee1a989 evdev: improve default scroll button detection
Try to guess the default scroll buttons a bit better. Right now we default to
scroll button 0 (disabled) whenever a device doesn't have a middle button but
we might as well cast a wider net here as setting a scroll button only has a
direct effect when button scrolling is enabled.

Use the first extra button we find or fall back onto the right button if we
don't have any extra buttons.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-24 10:27:32 +10:00
Peter Hutterer
927ad51fad doc: link the seats doc from the seat udev properties
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-24 09:53:20 +10:00
Peter Hutterer
9495713b05 touchpad: add MT_TOOL-based palm detection
If the touchpad driver tells us something is a palm, go with that.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-21 10:03:58 +10:00
Peter Hutterer
7d1a047b7c touchpad: add helper function for stopping current actions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-21 10:03:16 +10:00
Peter Hutterer
76fce6cddd touchpad: move edge palm init to separate helper
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-21 10:03:16 +10:00
Peter Hutterer
160d60eb85 touchpad: always enable trackpoint palm detection
Trackpoints are situated so that a user is pretty much guaranteed to trigger
some palm interaction, even if on a small touchpad. Always enable trackpoint
monitoring on touchpads where required.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-21 10:03:16 +10:00
Peter Hutterer
5a63c82822 touchpad: make palm detection logging a bit easier
Nested trinary conditions are fun, but...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-21 10:03:16 +10:00
Peter Hutterer
ddcf1f61bf touchpad: move edge palm detection into a helper too
Just code cleanup, no changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-21 10:03:16 +10:00
Peter Hutterer
60d3b6a8ed tools: update man page for debug-events --show-keycodes flag
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-20 13:52:31 +10:00
Peter Hutterer
0f6877104e tools: fix typo in list-devices man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-20 13:50:28 +10:00
Peter Hutterer
c7039eacb3 doc: drop superfluous </pre> tag
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-20 13:50:21 +10:00
Peter Hutterer
7944d89b97 configure.ac: drop auto-detection of features
During the work with meson I realised auto-detection is not a good solution.
Our dependencies should be well-defined for what is considered 'normal' and
explicitly defined for any deviation from that normal build.

The normal build includes docs, tools, tests, etc. because we expect
developers to find errors in any of those. A distribution build may exclude
some of these bits, but it should be explicitly specified by the distribution
rather than having our build system guess what's not needed.

This patch drops any auto-detection of features and replaces it with a hard
yes/no.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-04 11:10:29 +10:00
Nate Graham
88eaa7c1fd Fix build instructions for openSUSE
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100527

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-04 10:24:26 +10:00
Peter Hutterer
a49ebfe593 tablet: remove useless self-assignment
Introduced in 230af3f9fc

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-01 15:37:24 +10:00
Peter Hutterer
5dac1ece8c udev: set size hint for the Apple Magic Trackpad
Not required because it sets the resolution in the kernel, but we have a
generic "Apple touchpads" rule with a different size. Even though libinput
won't use this property, let's override the generic one with the right
dimensions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-30 15:04:13 +10:00
Peter Hutterer
4030959f35 test: unset MOUSE_DPI for the apple magic mouse
As of systemd commit f013e99e160f385a0c02793c612ef4c8a8ffc4d7, ID_BUS is now
set for all bluetooth devices, not just those with subsystem bluetooth. This
affects the Apple Magic Mouse and sets the systemd hwdb's MOUSE_DPI value.

That value is different to the test results we currently have, causing some
tests to fail because different deltas are generated (e.g.
pointer_scroll_button).

Our udev rules are prefixed 99 and thus apply after the various system rules.
So we can't easily set ID_BUS in our rule because it'll apply after
70-mouse.rules checks for the bustype. So we'd have to detect systemd version
or so, but the easy way is to simply force MOUSE_DPI to the empty value. For
our test cases it doesn't matter if the DPI is set correctly anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-30 12:56:49 +10:00
Peter Hutterer
402be40ba9 test: fix udev rule for click count device
Assigned click counts to other, unrelated devices

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-30 12:09:06 +10:00
Peter Hutterer
b4bb28caeb touchpad: don't try to unhover touches in NONE state
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-29 11:13:23 +10:00
Peter Hutterer
24445374b2 test: highlight the various state machines with colors
Makes visual identification easier

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-28 18:56:38 +10:00
Peter Hutterer
6ab2999be9 test: detect linebreaks in log messages
If a single log message is composed of multiple calls (as are all from
evdev_log_*), don't prefix multiple times.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-28 18:56:38 +10:00
Peter Hutterer
0bd36f2542 test: add color to litest verbose output
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-28 18:56:38 +10:00
Peter Hutterer
937541cb82 test: align litest output messages
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-28 18:56:38 +10:00
Peter Hutterer
7272696666 test: drop unused variable
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-28 18:56:38 +10:00
Peter Hutterer
58b89fbf2e evdev: fix typo in log message
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-28 18:56:38 +10:00
Peter Hutterer
6ba530f2d8 tools: use 'required_argument'/'no_argument' for getopt_long
See the getopt_long example, makes the code more obvious

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-24 11:42:44 +10:00