Peter Hutterer [Thu, 11 May 2017 01:47:47 +0000 (11:47 +1000)]
meson: add missing trailing slash to udev test path
Otherwise the absolute path to our test binary is invalid
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 9 May 2017 05:07:20 +0000 (15:07 +1000)]
touchpad: pull the tap exclusion zone down to the full edge zone
This was originally left outside of the button areas in case users tap in
those zones, but we're getting false tap events in that zone.
On a 100mm touchpad, the edge zone is merely 5mm, it's acceptable to ignore
taps in that area even in the software button. We can revisit this if we see
tap detection failures in the future.
https://bugzilla.redhat.com/show_bug.cgi?id=
1415796
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Eric Engestrom [Wed, 10 May 2017 03:06:32 +0000 (13:06 +1000)]
evdev: replace null sentinel with ARRAY_SIZE
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 10 May 2017 02:50:21 +0000 (12:50 +1000)]
Ensure enums are size int
Because otherwise things go boom, but unless you passed -fshort-enums this
shouldn't happen anyway. And gcc's documentation says don't do that. So don't
do that, or we'll scream at you.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
Tested-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Peter Hutterer [Wed, 10 May 2017 02:39:26 +0000 (12:39 +1000)]
Fix va_start compiler warning
../src/libinput.c:56:17: warning: passing an object that undergoes default
argument promotion to 'va_start' has undefined behavior [-Wvarargs]
The enum's size is compiler-defined, so the enum gets promoted to whatever the
compiler chose. That promotion is undefined, so let's use an int here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
Tested-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Peter Hutterer [Wed, 10 May 2017 02:33:10 +0000 (12:33 +1000)]
util: fix container_of() macro
Fixes a bunch of warnings of the kind
../src/evdev.h:378:32: warning: variable 'f' is uninitialized when used here [-Wuninitialized]
return container_of(dispatch, f, base);
Just typecasting NULL means we can ignore sample but for the type.
https://bugs.freedesktop.org/show_bug.cgi?id=100976
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
Tested-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Peter Hutterer [Wed, 10 May 2017 02:29:47 +0000 (12:29 +1000)]
util: drop GCC specifics for container_of
clang supports __typeof__ which was the only real difference. Not sure any
other compilers matter (that don't support __typeof__)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
Tested-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Peter Hutterer [Mon, 8 May 2017 02:18:51 +0000 (12:18 +1000)]
test: suppress Python3 valgrind errors
Running through mesontest also runs parse-hwdb through valgrind and
gives us a bunch of leaks that originate within Python somewhere - we don't
care about those.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 8 May 2017 03:35:07 +0000 (13:35 +1000)]
test: disable coredumps during test suite runs
Running valgrind through mesontest produces coredumps for a lot of tests
(unclear why, the core dump merely shows a call to abort). But even without
mesontest, creating a core dump for each failed test is a bad idea - if one
fails, most likely many others fail and the coredumps quickly fill up the file
system.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 May 2017 04:50:31 +0000 (14:50 +1000)]
lid: remove the keyboard listener on remove and re-init the listener
If the event listener is added, then removed again on a lid switch on/off
event, the list is set to null. This can trigger two crashes:
* when the keyboard is removed first, the call to
libinput_device_remove_event_listener() dereferences the null pointer
* when the switch is removed first, the call to device_destroy will find a
remaining event listener and assert
https://bugzilla.redhat.com/show_bug.cgi?id=
1440927
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 5 May 2017 02:48:35 +0000 (12:48 +1000)]
touchpad: remove the lid switch listener on device_removed
Sequence triggered by the xorg driver, but basically: if the touchpad is
destroyed before the lid switch, the event listener wasn't removed and an
assertion was triggered.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 May 2017 04:52:09 +0000 (14:52 +1000)]
util: add asserts with useful error messages to catch uninitialized lists
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 May 2017 03:30:02 +0000 (13:30 +1000)]
doc: add build instructions for meson
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 30 Nov 2016 07:59:17 +0000 (17:59 +1000)]
Add meson.build file
v2:
- meson 0.40 requirement
- add_project_arguments() instead of add_global_arguments()
- use cc.get_define('static_assert')
- use config.set10 and config.set_quoted instead of manual handling
- more use of join_paths
- use files() for model quirks hwdb check
- update options to all state 'true' as default instead of variations of
'true', 'enabled' and 'yes'
v3:
- drop -Wall -Wextra and -g, let meson set that with warning_level/debug build
- add meson files to EXTRA_DIST
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 27 Apr 2017 00:23:45 +0000 (10:23 +1000)]
test: switch from #ifdef to #if HAVE_LIBUNWIND
We use #if everywhere else and it allows building with '-Wundef -Werror=undef'
to avoid accidental misuse.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 26 Apr 2017 01:09:14 +0000 (11:09 +1000)]
configure.ac: drop checks for a few flags
These were added in 2013 for old enterprise distributions (centos 5.5, see fdo
bz 63360), it's now 4 years later and these checks seems a bit superfluous.
If those bits are missing, compilation will fail anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 26 Apr 2017 00:55:53 +0000 (10:55 +1000)]
test: allow running the symbols-leak-test.in script directly
With autotools, we replace the @top_srcdir@ during configure and then run teh
resulting scripts.
With meson, it's easier to just pass top-srcdir it in as argument.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Peter Hutterer [Wed, 26 Apr 2017 00:33:37 +0000 (10:33 +1000)]
doc: drop the explicit input from the doxygen.in
We pass in the input via the commandline, so having the files here is
misleading. Replace it with an @INPUT@ - in autotools that one is ignored but
it'll help meson.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 7 Dec 2016 01:14:07 +0000 (11:14 +1000)]
Rename man pages to .1 suffix for meson's benefit
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 May 2017 03:22:03 +0000 (13:22 +1000)]
doc: update build instructions for lack of autodetection
Since we dropped autodetection of features in configure, these instructions
were incorrect.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 May 2017 02:44:25 +0000 (12:44 +1000)]
test: fix compiler warning
test-tablet.c: In function ‘proximity_in_out’:
test-tablet.c:797:20: warning: increment of a boolean expression [-Wbool-operation]
have_tool_update++;
And tighten the test so we fail for multiple prox in events
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 May 2017 02:42:23 +0000 (12:42 +1000)]
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>
Peter Hutterer [Thu, 4 May 2017 01:51:36 +0000 (11:51 +1000)]
Merge branch 'wip/touchpad-tap-timestamps'
Peter Hutterer [Wed, 3 May 2017 11:08:14 +0000 (21:08 +1000)]
lid: fix some indentation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Marcos Paulo de Souza [Wed, 3 May 2017 01:54:03 +0000 (22:54 -0300)]
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>
Peter Hutterer [Tue, 2 May 2017 05:34:58 +0000 (15:34 +1000)]
doc: fix doxygen group for libinput_event_tablet_pad_get_time
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 1 May 2017 09:58:13 +0000 (19:58 +1000)]
doc: document the event timestamps
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Paul Kocialkowski [Fri, 28 Apr 2017 13:29:04 +0000 (15:29 +0200)]
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>
Paul Kocialkowski [Fri, 28 Apr 2017 13:29:03 +0000 (15:29 +0200)]
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>
Paul Kocialkowski [Fri, 28 Apr 2017 13:29:02 +0000 (15:29 +0200)]
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>
Peter Hutterer [Fri, 28 Apr 2017 03:44:59 +0000 (13:44 +1000)]
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>
Peter Hutterer [Wed, 26 Apr 2017 04:40:11 +0000 (14:40 +1000)]
touchpad: add touch state debugging helper
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 28 Apr 2017 04:51:06 +0000 (14:51 +1000)]
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>
Peter Hutterer [Fri, 28 Apr 2017 03:52:07 +0000 (13:52 +1000)]
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>
Peter Hutterer [Fri, 28 Apr 2017 03:34:56 +0000 (13:34 +1000)]
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>
Peter Hutterer [Thu, 27 Apr 2017 04:12:11 +0000 (14:12 +1000)]
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>
Peter Hutterer [Fri, 28 Apr 2017 00:11:01 +0000 (10:11 +1000)]
doc: add a faq for synclient/syndaemon
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 26 Apr 2017 02:38:28 +0000 (12:38 +1000)]
Merge branch 'wip/touchpad-custom-pressure-values'
Peter Hutterer [Mon, 24 Apr 2017 05:58:22 +0000 (15:58 +1000)]
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>
Peter Hutterer [Wed, 19 Apr 2017 04:11:45 +0000 (14:11 +1000)]
doc: add documentation for touchpad pressure detection
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 19 Apr 2017 03:45:34 +0000 (13:45 +1000)]
touchpad: move the pressure range to a hwdb entry
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 26 Apr 2017 02:23:24 +0000 (12:23 +1000)]
Merge branch 'wip/touchpad-mt-tool-palm'
Peter Hutterer [Tue, 25 Apr 2017 22:31:15 +0000 (08:31 +1000)]
configure.ac: quote the xyes for the libunwind check
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 25 Apr 2017 22:30:44 +0000 (08:30 +1000)]
configure.ac: move some checks out of the libwacom section
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 20 Apr 2017 05:54:55 +0000 (15:54 +1000)]
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>
Peter Hutterer [Thu, 20 Apr 2017 22:47:31 +0000 (08:47 +1000)]
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>
Peter Hutterer [Mon, 27 Feb 2017 01:20:14 +0000 (11:20 +1000)]
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>
Peter Hutterer [Thu, 20 Apr 2017 10:21:43 +0000 (20:21 +1000)]
doc: link the seats doc from the seat udev properties
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 3 Apr 2017 03:58:42 +0000 (13:58 +1000)]
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>
Peter Hutterer [Mon, 3 Apr 2017 05:15:01 +0000 (15:15 +1000)]
touchpad: add helper function for stopping current actions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 3 Apr 2017 03:31:50 +0000 (13:31 +1000)]
touchpad: move edge palm init to separate helper
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 3 Apr 2017 03:27:52 +0000 (13:27 +1000)]
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>
Peter Hutterer [Thu, 23 Mar 2017 03:55:32 +0000 (13:55 +1000)]
touchpad: make palm detection logging a bit easier
Nested trinary conditions are fun, but...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 23 Mar 2017 03:46:51 +0000 (13:46 +1000)]
touchpad: move edge palm detection into a helper too
Just code cleanup, no changes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 20 Apr 2017 01:04:44 +0000 (11:04 +1000)]
tools: update man page for debug-events --show-keycodes flag
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 20 Apr 2017 00:43:01 +0000 (10:43 +1000)]
tools: fix typo in list-devices man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 19 Apr 2017 04:11:25 +0000 (14:11 +1000)]
doc: drop superfluous </pre> tag
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 4 Apr 2017 01:10:29 +0000 (11:10 +1000)]
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>
Nate Graham [Mon, 3 Apr 2017 14:51:22 +0000 (08:51 -0600)]
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>
Peter Hutterer [Sat, 1 Apr 2017 05:37:24 +0000 (15:37 +1000)]
tablet: remove useless self-assignment
Introduced in
230af3f9fcf
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 30 Mar 2017 05:04:13 +0000 (15:04 +1000)]
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>
Peter Hutterer [Thu, 30 Mar 2017 02:50:13 +0000 (12:50 +1000)]
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>
Peter Hutterer [Thu, 30 Mar 2017 02:09:06 +0000 (12:09 +1000)]
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>
Peter Hutterer [Wed, 29 Mar 2017 00:36:30 +0000 (10:36 +1000)]
touchpad: don't try to unhover touches in NONE state
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 28 Mar 2017 01:48:52 +0000 (11:48 +1000)]
test: highlight the various state machines with colors
Makes visual identification easier
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 28 Mar 2017 01:38:12 +0000 (11:38 +1000)]
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>
Peter Hutterer [Tue, 28 Mar 2017 01:31:16 +0000 (11:31 +1000)]
test: add color to litest verbose output
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 28 Mar 2017 01:23:15 +0000 (11:23 +1000)]
test: align litest output messages
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 27 Mar 2017 22:55:35 +0000 (08:55 +1000)]
test: drop unused variable
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 28 Mar 2017 03:13:46 +0000 (13:13 +1000)]
evdev: fix typo in log message
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 24 Mar 2017 00:11:02 +0000 (10:11 +1000)]
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>
Peter Hutterer [Thu, 23 Mar 2017 00:18:19 +0000 (10:18 +1000)]
Merge branch 'wip/tablet-wobbly-lines-v2'
Peter Hutterer [Tue, 7 Mar 2017 06:00:45 +0000 (16:00 +1000)]
tablet: add axis smoothing
Taking the tablet events as-is produces the occasional wobble in what should
be a straight line. Bug 99961 has a jpg attachment to illustrate that.
Emulate the wacom driver behavior and average x/y across the last 4 values to
smoothen out these dents.
https://bugs.freedesktop.org/show_bug.cgi?id=99961
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pingc@wacom.com>
Peter Hutterer [Tue, 7 Mar 2017 07:08:07 +0000 (17:08 +1000)]
tablet: reset delta and changed axes as soon as we send them
We don't have frame events for tablets so we must take care to send the
axis change notifications only once and leave the others as-is. Most of the
axes are absolute so it doesn't really matter, but we need to reset the delta
to make sure clients don't receive the same delta twice.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pingc@wacom.com>
Peter Hutterer [Tue, 7 Mar 2017 06:37:55 +0000 (16:37 +1000)]
tablet: add assert that deltas are always 0
The tablet axis struct has a delta field that's only useful for the events,
not for our internal axis handling. Make sure we never set it to anything
nonzero.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pingc@wacom.com>
Peter Hutterer [Tue, 7 Mar 2017 05:32:59 +0000 (15:32 +1000)]
tablet: split point vs delta handling up
Handle the delta in the end once we've updated the device state for all axes.
This requires us to use the device history rather than the current state
delta, and it also requires us to update both x and y whenever an axis change
comes in.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pingc@wacom.com>
Peter Hutterer [Tue, 7 Mar 2017 04:02:53 +0000 (14:02 +1000)]
table: move custom rotation handling into a helper function
This is a bit hard to follow:
- tilt is handled first and if either tilt axis is set we fetch *both* tilt axes
into tablet->axes.tilt
- rotation is handled second but it only triggers if either tilt axis is
flagged. as we now guarantee to have both axes in tablet->axes.tilt, we
can continue with the rotation conversion without needing some other state
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pingc@wacom.com>
Peter Hutterer [Tue, 7 Mar 2017 03:29:23 +0000 (13:29 +1000)]
tablet: reshuffle device axis updates
This is prep work for axis smoothing. Modify the various helper functions to
just update the state in the tablet and then grab the state later for better
grouping.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pingc@wacom.com>
Peter Hutterer [Tue, 7 Mar 2017 03:20:32 +0000 (13:20 +1000)]
tablet: move the axis transforms to the end
No functional changes, part of the grouping of tablet axis manipulation vs.
processing of that manipulated state.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pingc@wacom.com>
Peter Hutterer [Tue, 7 Mar 2017 03:17:43 +0000 (13:17 +1000)]
tablet: move delta processing down
No functional changes, this is just to group the calls that modify tablet axis
state together and move the bits that rely on this state (but don't modify it)
to the bottom.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pingc@wacom.com>
Peter Hutterer [Tue, 7 Mar 2017 03:11:51 +0000 (13:11 +1000)]
tablet: add a motion history
Stores the processed axes values in a history 4 events deep. Currently unused
but will be used to smoothen out axis values to avoid transducer-caused axis
wobbles.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pingc@wacom.com>
Peter Hutterer [Wed, 1 Mar 2017 05:59:44 +0000 (15:59 +1000)]
tablet: move definition of tablet_axes down
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pingc@wacom.com>
Peter Hutterer [Wed, 1 Mar 2017 05:22:49 +0000 (15:22 +1000)]
tablet: reshuffle the event sending code
The current code modifies a bit of state inside the proximity_tip_down
function which makes for confusing reading. Clean this up by having a bunch of
helper functions for the various events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pingc@wacom.com>
Peter Hutterer [Thu, 2 Mar 2017 03:17:56 +0000 (13:17 +1000)]
tablet: remove unnecessary out-of-proximity check
This cannot trigger because we'd never get here if out-of-proximity is set,
tablet_flush() will return early.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pingc@wacom.com>
Peter Hutterer [Wed, 1 Mar 2017 05:42:10 +0000 (15:42 +1000)]
tablet: drop unnecessary call to reset the changed axes
The only code path that leads here would see the changed_axes array zeroed out
in tablet_send_axis_proximity_tip_down_events(), zeroing again is unlikely to
make it more zero.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pingc@wacom.com>
Peter Hutterer [Wed, 1 Mar 2017 03:42:09 +0000 (13:42 +1000)]
touchpad: add touchpad pressure state debugging to debug output
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 22 Mar 2017 23:16:01 +0000 (09:16 +1000)]
configure.ac: libinput 1.7.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 22 Mar 2017 10:59:07 +0000 (20:59 +1000)]
evdev: mark the new log functions as printf-style functions
And fix up the one buggy call we had
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 12 Mar 2017 23:29:06 +0000 (09:29 +1000)]
touchpad: add pressure ranges for cyapa touchpads
https://bugs.freedesktop.org/show_bug.cgi?id=100122
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 21 Mar 2017 01:17:28 +0000 (11:17 +1000)]
tools: print axes, but not capabilities on proximity out
Print the axis values on proximity out because it a) ensures we have the right
values and b) makes the output better aligned with the proximity in, so it's
easier to spot in a log file. But don't print the tool capabilities because
they're unrelated to the prox out anyway and again it makes the output easier
to spot.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 14 Mar 2017 02:24:36 +0000 (12:24 +1000)]
test: add missing linebreak to error message
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 14 Mar 2017 02:04:06 +0000 (12:04 +1000)]
test: fix tablet touch arbitration case
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 14 Mar 2017 01:23:55 +0000 (11:23 +1000)]
test: don't use the same mouse twice
No effect since we don't care about the mouse itself. But when running
on kernels without uinput's UI_GET_SYSNAME this can cause misdetection of
the uinput device and test case failures. Simply picking a differently named
device avoids that.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 8 Mar 2017 23:50:06 +0000 (09:50 +1000)]
configure.ac: libinput 1.7rc2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 8 Mar 2017 21:50:32 +0000 (07:50 +1000)]
configure.ac: set AC_CONFIG_AUX_DIR
If not set, libtool will search directories up to ../.. for an install-sh and
then dump the aux files there. This caused a couple of problems with the xorg
release.sh script that now uses worktrees but is generally bad behaviour
because we can't guarantee that we're not inside some other repository.
Set AC_CONFIG_AUX_DIR to avoid this behavior.
See https://lists.freedesktop.org/archives/xorg-devel/2017-March/053006.html
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Peter Hutterer [Thu, 9 Mar 2017 01:03:49 +0000 (11:03 +1000)]
doc: expand on the default tap settings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 8 Mar 2017 04:44:26 +0000 (14:44 +1000)]
test: drop ABS_MT_PRESSURE from the bcm5974
This device only sends ABS_PRESSURE
https://bugs.freedesktop.org/show_bug.cgi?id=100106
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 8 Mar 2017 04:36:56 +0000 (14:36 +1000)]
doc: expand build instructinos
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 6 Mar 2017 04:31:40 +0000 (14:31 +1000)]
touchpad: add elantech-specific pressure values
https://bugs.freedesktop.org/show_bug.cgi?id=99975
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 1 Mar 2017 01:26:06 +0000 (11:26 +1000)]
touchpad: ignore hovering touches for the software button state
If a touch started hovering in the main area, the button state would start
with AREA and never move to the real button state, despite the finger
triggering the pressure thresholds correctly in one of the areas.
This could even happen across touch sequences if a touch went below pressure
in the software button area, it changed to hovering and the button state
changed to NONE. On the next event, the touch is still hovering and the
current position of the touch is taken for the button state machine.
https://bugs.freedesktop.org/show_bug.cgi?id=99976
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>