Commit graph

3313 commits

Author SHA1 Message Date
Greg V
4e3ea4b8e6 Autodetect and use libepoll-shim on FreeBSD 2018-07-18 21:07:24 +03:00
Greg V
61f3e38544 Add input.h for FreeBSD 2018-07-16 13:48:54 +03:00
Greg V
d23074cec9 test: ptrace compatibility with *BSD 2018-07-16 13:48:54 +03:00
Greg V
8cc4de5fc9 test: use simple portable sendfile
There's no need for high performance in these little tests, so instead of
supporting various platform-specific sendfile() implementations, just use a local read-write function.
2018-07-16 13:48:54 +03:00
Greg V
63a2180b40 test: support disabling tty on FreeBSD
Instead of K_OFF, use K_RAW plus termios raw mode.
(Same approach as in the Weston patches)
2018-07-16 13:48:51 +03:00
Greg V
ef9b7e889d Use getprogname() when program_invocation_short_name is not defined 2018-07-16 13:44:15 +03:00
Greg V
0e03784e47 Fix include portablity (xlocale, stdlib) 2018-07-16 13:44:15 +03:00
Greg V
f8b412052e Import versionsort implementation from musl for systems without versionsort
versionsort is a GNU extension, not available on *BSD systems.
2018-07-16 13:44:11 +03:00
Peter Hutterer
8362031064 fallback: remove some if 0 code
Looks like a development leftover.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-16 12:16:18 +10:00
Peter Hutterer
c013112406 evdev: whitespace fix
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-16 12:16:18 +10:00
Peter Hutterer
bda4857eaf test: remove unsupported events from the invalid-range touchscreen test device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-16 10:37:42 +10:00
Greg V
cc029c7497 test: remove unused values.h include 2018-07-16 08:32:38 +10:00
Peter Hutterer
e6cad92005 Rename data/ to quirks/
A better, less ambiguous name than just "datadir"

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-13 13:30:54 +10:00
Peter Hutterer
e2d62645db data: add HP Chromebook 14 pressure ranges
Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/51

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-13 12:44:10 +10:00
Peter Hutterer
3cae73a7b5 tap: log a tap bug for release on MULTITAP_PALM
If we get here, the finger may only triger a PALM_UP but not a RELEASE event.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-13 11:08:56 +10:00
Peter Hutterer
847e0b68bc tap: remove unnecessary TAP_STATE_DEAD assignment
All palm touches are set to DEAD anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-13 10:56:51 +10:00
Peter Hutterer
6511dca633 Merge branch 'wip/trackpoint-acceleration' 2018-07-12 16:48:49 +10:00
Peter Hutterer
3c4e793442 Gitlab CI: use a space in the meson builddir
Ideally this should catch any errors caused by reliance on unspaced
directories.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-12 14:38:31 +10:00
Peter Hutterer
deadbf35c4 doc: move the meson.build in as subdir()
Doing so means we can ditch the specific input list for doxygen and just copy
all files over into our builddir/doc/ subdir, then use that subdirectory as
input data.

This relies on meson putting a subdir() into a subdirectory in the build
directory. This isn't technically guaranteed but I also suspect that if meson
ever changes that, lots of other projects will break. Even in that case we
should build just fine since we now filter for *.h and *.dox and don't copy
any other doxygen-commented files into the builddir anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-12 14:05:52 +10:00
Peter Hutterer
6b73d93ca4 test: tidy up the symbols leak test
This hasn't been a real .in file since the autotools removal, so rename it to
reflect that. And since we can call it with arguments from meson, let's do so
in the most sensible manner - passing the full paths in as required rather
than relying on a directory layout within the script.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-12 11:09:00 +10:00
Peter Hutterer
fa66edcd73 meson.build: move the directory path generation to a single section
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-12 11:08:54 +10:00
Peter Hutterer
43cd2cbf83 data: add the dell trackpoint multipliers
From systemd's hwdb/70-pointingstick.hwdb

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-11 16:49:25 +10:00
Peter Hutterer
210813f3a8 quirks: append "Touchpad" to the various dell touchpad quirks
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-11 16:49:02 +10:00
Peter Hutterer
f4dc296247 quirks: remove the leftovers of the trackpoint range attribute
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-11 16:49:02 +10:00
Peter Hutterer
a857b399f2 quirks: remove the trackpoint range quirks entries
The only trackpoint where I have a rough idea what we need is the ALPS v8 one.
All other ones we'll have to re-do.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-11 16:49:00 +10:00
Peter Hutterer
27f7a66de4 filter: add a trackpoint multiplier factor
Measuring the trackpoint range has not shown to be sufficient or precise
enough to be used as an ingredient for trackpoint acceleration. So let's just
switch back to a generic multiplier that we can apply to the input deltas do
undo any device-specific lack of scaling.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-11 16:04:59 +10:00
Peter Hutterer
1cc9f44e93 quirks: add quirks_get_double()
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-11 16:04:59 +10:00
Peter Hutterer
0021f9e7a8 tools: make-ptraccel-graphs: drop an unnecessary outfile
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-11 16:04:59 +10:00
Peter Hutterer
6480bfe14d tools: drop the special handling for trackpoint accel, not needed anymore
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-11 16:04:59 +10:00
Peter Hutterer
fc92aaf545 tools: reduce the trackpoint gnuplot range to 0..1 units/ms
Anything above 1 unit/ms is high pressure. Though that depends on the
trackpoint range, so...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-11 16:04:59 +10:00
Peter Hutterer
5f9c985661 tools: fix units for trackpoint accel graph
We use speed now and trackpoints are in units/ms

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-11 16:04:59 +10:00
Peter Hutterer
6dca5df806 filter: make the trackpoint accel profile func the same prototype as the others
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-11 16:04:59 +10:00
Peter Hutterer
831ce3c0d3 filter: replace the trackpoint accel with a velocity-based one
This gets rid of the trackpoint range propery that we've been parsing until
now and instead just opts for a basic curve with some deceleration for low
pressure. The speed range is taken from the touchpad and should be wide enough
for most trackpoints that fall within the expected range.

Trackpoints like the new ALPS ones need to be configured through a hwdb (this
part is currently missing).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-11 16:04:59 +10:00
Peter Hutterer
529755e18f doc: add a subsection on how to use libinput record --autorestart
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-10 18:04:20 +10:00
Peter Hutterer
0125a06826 doc: libinput-measure is a section, not a subsection
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-10 18:04:15 +10:00
Peter Hutterer
00fdbe3951 tools: don't add the debug behavior for release builds
When the meson build type is something other than the debug types, we don't
need the special behavior where we adjust executable paths and data dir
lookup for tools run directly from the builddir.

This avoids leaking the build dir into the final executables.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-09 13:27:15 +10:00
Peter Hutterer
6be9c3c84e tools: fake-build the other tools the same way as measure touchpad-tap
Doesn't actually do anything but this way they end up in the builddir and can
be picked up by ./builddir/libinput measure fuzz, etc.

And rename the source files to .py to signal that they are not supposed to be
directly executed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-09 11:28:41 +10:00
Peter Hutterer
2caf557e10 tools: rely on the libinput and quirks tool to pick the right directories
Don't use a custom hack here, just make sure the tool ends up in the builddir
so it's picked up by the libinput main tool.

This means the PATH isn't set up correctly when called directly
(./builddir/libinput-measure-touchpad-pressure) but the workaround is to
always use the libinput tool - just as we expect from users.

To make it more obvious that we're not supposed to run this directly, rename
the source file to .py

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-09 11:28:41 +10:00
Peter Hutterer
25a6535570 tools: quirks: if we're executing from the builddir, use the git datadir
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-09 11:28:41 +10:00
Peter Hutterer
7e7d657dab tools: if the execdir is the builddir, add it to the path
When running libinput tools from the builddir, look up the subtools in the
builddir as well. Otherwise, add the install prefix to the list of lookup
locations.

This ensures that a) we're running builddir stuff against builddir stuff, but
also b) that we're not running builddir stuff against installed stuff because
that may give us false positives.

The test was squashed in from a separate patch and was
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-09 11:28:41 +10:00
Peter Hutterer
ff15bfd99f doc: drop the git version into the documentation
The libinput/doc/latest is now built automatically from git, so it's good to
have a reference to show which commit it was being built from. Add a section
to the readme with git commit information that is replaced by meson.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-06 11:04:07 +10:00
Peter Hutterer
d2cd727c9b Switch to using files() for the doxygen input sources
Using files() over a list of hand-constructed paths is the recommended way.
But unfortunately doxygen needs its input files as a string list, so we still
have to build that list anyway. Still, this way we don't need to hardcode
every file with the source root, we just assemble it as we go.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-06 11:03:37 +10:00
Peter Hutterer
e972cc9664 GitLab CI: only rebuild the website when pushing to libinput proper
We don't want to try build when someone pushes to <username>/libinput

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-06 10:16:09 +10:00
Peter Hutterer
9e24e3f05e Gitlab CI: trigger the wayland web rebuild on pushes to master
This requires that WAYLAND_WEB_TOKEN is set up in the libinput settings on
gitlab.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-06 09:38:18 +10:00
Peter Hutterer
74694ae8f8 GitLab CI: move the scan-build job up in the file
This is by far the slowest job, move it up so it gets started earlier and we
have more parallelization going on.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-06 09:36:32 +10:00
Peter Hutterer
b469368790 test: misc: up the time limit on the ratelimit tests
I keep hitting this in the gitlab runner, 100ms is clearly not enough here for
slow containers.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-05 13:55:21 +10:00
Peter Hutterer
2192ec192c doc: add the switches page to a "other devices" category
It felt a bit lost at the bottom of the "pages" list.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-05 12:00:31 +10:00
Peter Hutterer
45e3218863 doc: build doxygen output into "Documentation"
Slightly more obvious than just "html". Main motivation here is that we want
to provide the documentation as artifact from GitLab's CI, so having it unzip
to something slightly more meaningful makes sense.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-05 10:29:50 +10:00
Peter Hutterer
e4dd781353 GitLab CI: rename MESON_PARAMS to MESON_ARGS
More correct, and we use NINJA_ARGS too

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-05 10:28:56 +10:00
Peter Hutterer
3bdeae5adb Gitlab CI: run the tests through valgrind on the f28 box
We don't run it on all machines, valgrind fails right now on arch because of a
memleak in bash itself. To avoid having CI failures that aren't our fault,
only run on F28 because that's the one I'm tracking.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-07-04 16:11:48 +10:00