Peter Hutterer [Mon, 19 Jun 2017 00:37:36 +0000 (10:37 +1000)]
evdev: default to log error priority
Fixes compiler warning:
evdev.c:2899:2: warning: 'pri' may be used uninitialized in this function
[-Wmaybe-uninitialized]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 15 Jun 2017 08:01:13 +0000 (18:01 +1000)]
configure.ac: libinput 1.7.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 13 Jun 2017 05:18:56 +0000 (15:18 +1000)]
tools: grab the pointer in the debug gui
Because it's too annoying to trigger the hot corner every few seconds while
pointer debugging.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 14 Jun 2017 05:35:28 +0000 (15:35 +1000)]
gitignore: drop test/test-* pattern
Obsolete since the libinput-test-suite-runner was added
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 14 Jun 2017 02:57:19 +0000 (12:57 +1000)]
Remove vestiges of the event-gui
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 13 Jun 2017 03:53:10 +0000 (13:53 +1000)]
tools: note that the touchpad-tap measuring tool picks a touchpad
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 13 Jun 2017 02:32:43 +0000 (12:32 +1000)]
doc: use the same formatting for the gcc command as for everything else
Without the @code tag, the font size differs to everything else in this file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 13 Jun 2017 02:30:35 +0000 (12:30 +1000)]
doc: update building notes with the bug to ninja vs ninja-build on Fedora
Up-to-date Fedora doesn't need to use ninja-build anymore
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 13 Jun 2017 02:28:37 +0000 (12:28 +1000)]
tools: update the publish-doc tool to use ninja
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 13 Jun 2017 02:20:34 +0000 (12:20 +1000)]
doc: add a short blurb regarding lid switch handling
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 7 Jun 2017 03:30:48 +0000 (13:30 +1000)]
test: decouple our tests/test suites from the ones used by check
Check arranges the tests into suites and test cases (which then can have
multiple test functions). The primary feature for suites is the ability to
select them with environment variables and that the log messages are printed
per suite, not per test case.
We used the suites to distribute tests across the processes forked by the test
runner, but that also resulted in slow suites relying on timeouts (tap/dwt) to
take a lot longer than other suites and hold everything else up.
This patch basically drops the use of check test suites. Our test runner has a
--filter-group argument which selects on suite names, the log messages are
more useful if they immediately include the device and the test case name.
So we just save the test metatdata in our own struct and then assemble a
suite/test case on the fly for each test.
The advantage of this is that tests of the same suite are now distributed
across the forks so slow tests that rely on length timeouts are now run in
parallel. This brings the test runs down to under 6 min again.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 12 Jun 2017 22:33:12 +0000 (08:33 +1000)]
tools: free the tap data on error
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 12 Jun 2017 22:31:15 +0000 (08:31 +1000)]
tools: add missing toffset copy from src to dest while duplicating
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 9 Jun 2017 05:00:36 +0000 (15:00 +1000)]
tools: point out that measuring taps may be different to what libinput sees
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 9 Jun 2017 02:25:50 +0000 (12:25 +1000)]
test: localise the open/close function counter in the path tests
Reduces the chance of interference between tests.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 2 Jun 2017 06:59:09 +0000 (16:59 +1000)]
test: use unique names for all the test suite names
This makes it possible to run multiple test suite simultaneously on the same
host without messing up the other runs (provided that all instances use
the same udev/hwdb files). Previously, removing the udev rules/hwdb at the end
of a test run would cause test case failures in other runs that hadn't
completed yet.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Peter Hutterer [Wed, 7 Jun 2017 01:43:40 +0000 (11:43 +1000)]
test: remove unused devices field from struct test
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Paul Kocialkowski [Fri, 28 Apr 2017 13:33:01 +0000 (15:33 +0200)]
udev: Add specific pressure range for the Chromebook R13 CB5-312T
This adds specific pressure range values for the Elan touchpad found in
the Chromebook R13 CB5-312T (codename elm).
These values allow using the touchpad from the tip of the finger and
makes scrolling generally more reactive.
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:33:00 +0000 (15:33 +0200)]
udev: Add generic pressure range values for I2C Elan touchpads
This adds generic pressure range values for I2C Elan touchpads used
with device-tree. These values were tested to work with various devices
and should be acceptable in most cases.
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:32:59 +0000 (15:32 +0200)]
udev: Add support for device-tree-based model selection
This adds support for detecting input peripherals based on their name
and the device-tree model of the device they're used with.
This is mostly an equivalent to dmi-based model detection (e.g. on x86
devices) for device that use device-tree (e.g. on ARM devices).
Note that this requires systemd updates, see
https://github.com/systemd/systemd/pull/5837
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 [Tue, 6 Jun 2017 07:54:18 +0000 (17:54 +1000)]
tools: fix linker error with the debug-gui
Make sure we link libudev into everything that requires it
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 6 Jun 2017 05:20:40 +0000 (15:20 +1000)]
tools: link libinput.la for libshared.la
Hopefully fixes the Semaphore CI build failures, apparently things are a bit
more restrictive there than in Fedora 26.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 6 Jun 2017 04:26:33 +0000 (14:26 +1000)]
configure.ac: require libevdev 1.3 or later
b5e3fd04b2ab667e844e34 added hooks for the libevdev log handler and that one
was added in libevdev 1.3 (released in Sep 2014).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 2 Jun 2017 02:15:50 +0000 (12:15 +1000)]
tools: escape all dashes in man pages (for commands and options)
Apparently the rule is that if a dash may end up being copy/pasted, it needs
to be escaped.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 2 Jun 2017 02:10:03 +0000 (12:10 +1000)]
tools: man page cleanup - lowercase all command names
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 23 May 2017 05:07:31 +0000 (15:07 +1000)]
tools: add "libinput measure touchpad-tap"
This is the first tool of many more to come to enable users to gather
information aobut their devices and/or usage of these devices. Previously,
these required the users to record events, submit them to a bugzilla, have me
run various scripts over it and then decree that the scripts have spoken.
Push some of this into the hands of the users so they can query the numbers
locally and start investigating (or at least get an idea of what's happening).
This tool measures the time deltas between touch up and touch down and prints
a basic summary, together with the ability to print a dat file with the data
for visualization by e.g. gnuplot. Eventually, more of the current analysis
scripts will be moved into this or other helpers.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 25 May 2017 22:56:29 +0000 (08:56 +1000)]
Add tv2us helper function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 25 May 2017 07:46:07 +0000 (17:46 +1000)]
tools: link to the online documentation from the libinput(1) man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 25 May 2017 07:33:03 +0000 (17:33 +1000)]
tools: split the install_man() up for better grouping of tools
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 25 May 2017 06:07:14 +0000 (16:07 +1000)]
tools: make the libinput tool usage static
This now makes the header obsolete too
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 25 May 2017 05:47:19 +0000 (15:47 +1000)]
tools: Reinstate libshared.la and add it to meson.build too
Removed with commit
863fd1f0ebf145dc2b3a59e2a3e57dbc4ce77eaf but now that we
exec each subcommand, the previous per-target compilation flags aren't needed
anymore. Build a static library to avoid rebuilding the source files for each
target.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 24 May 2017 01:12:28 +0000 (11:12 +1000)]
doc: update for the new libinput tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 25 May 2017 05:42:46 +0000 (15:42 +1000)]
tools: tidy up the usage() for the tools a bit
Now that the debug-gui is a user-visible tool, make sure the usage reflects
the right command name.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 24 May 2017 00:36:44 +0000 (10:36 +1000)]
Fold the event-gui into the libinput tool
It's common enough for users to want to debug libinput behavior without
interference by the compositor or the X server. Being able to run a GUI
without having to compile from git is helpful.
Note that this changes --enable-event-gui autotools option to
--enable-debug-gui and the event-gui mesonconf option to debug-gui.
This also drops the standalone event-gui binary in both autotools and meson.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 25 May 2017 00:12:26 +0000 (10:12 +1000)]
tools: switch the libinput tool to be an exec-ing tool
Chaining args together inside a single binary would be nice, but it gets nasty
quickly (as I found out adding 3, 4 extra commands). Switch over to using a
git-style exec-ing command where libinput merely changes argv[0] and then
executes whatever it assembled. And those binaries can hide in libexec so they
don't clutter up the global namespace.
This also makes it a lot easier to write man pages, adopt the same style as
git uses.
Compatibilty wrapper scripts are provided for libinput-list-devices and
libinput-debug events. These warn the user about the changed command, then
exec the new one. Expect these wrappers to be removed at some point in the
future.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 24 May 2017 00:17:46 +0000 (10:17 +1000)]
tools: drop event-debug
It's the same thing as libinput-debug-events and the newer "libinput
debug-events" command. The only reason it existed after we started providing
libinput-debug-events is the -no-install libtool flag that makes debugging
with gdb bearable.
Now that we're slowly moving to meson, this isn't needed anymore. If you want
to gdb directly in the source tree, build with meson.
Or use "libtool --mode=execute gdb" for an autotools build.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 1 Jun 2017 23:35:56 +0000 (09:35 +1000)]
meson: add a test setup for valgrind
To run valgrind properly, we need a couple of arguments passed in so we check
for leaks and don't fail on bits of the stack we don't control. Add a
mesontest setup for this, the lot can now be run by
mesontest --setup=valgrind
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 1 Jun 2017 22:32:22 +0000 (08:32 +1000)]
meson: drop LITEST_VERBOSE environment variable
Removed from autotools in
1f5c5cf2c but somehow made a comeback
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 1 Jun 2017 22:14:26 +0000 (08:14 +1000)]
test: remove unused litest_handle_events
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 1 Jun 2017 05:43:14 +0000 (15:43 +1000)]
test: limit the wait_for_event timeout to 2s
No internal timeout we have takes longer than 2s, so we can abort if we don't
succeed. This gives us a better backtrace to figure out where we're hanging
than the SIGABRT that check will eventually send us.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 1 Jun 2017 05:00:27 +0000 (15:00 +1000)]
test: don't leak test warnings to stdout
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 1 Jun 2017 05:26:51 +0000 (15:26 +1000)]
evdev: hook up the libevdev log handler
Make sure any messages from libevdev end up in the same place as libinput's
messages
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 30 May 2017 03:02:28 +0000 (13:02 +1000)]
test: drop two superfluous empty queue checks
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 30 May 2017 00:13:32 +0000 (10:13 +1000)]
test: tighten some test cases
Instead of just waiting for events, use a libinput_dispatch() and assume the
event is there when we want it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 30 May 2017 05:26:16 +0000 (15:26 +1000)]
test: add an extra assert into litest_wait_for_event_of_type
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 31 May 2017 02:01:16 +0000 (12:01 +1000)]
test: make sure we search for event node, not the parent input device
This explains the heisenbugs when running the test suite. libevdev gives us
the syspath to the /sys/.../input123 node, not the one for the event node.
The device node path is created based on the sysfs tree, so there's a
window where the device node may not exist yet but we already returned the
device node path.
In litest, we're using a udev monitor to wait until the device is ready for
us, but the path interface only takes a device node path. So what happens is:
* libevdev gives us a syspath for the input node and a device path
* the monitor receives the input node udev device and matches the syspath
* we pass that up to the caller litest_add_device_with_overrides()
which opens the device node and adds it to libinput
* the path interface creates a udev device from the device node, which still
points to the old device node. Things fail because we don't have the device
we expect or it doesn't send events and eventually times out [1].
The errors triggered by this are either odd udev property mismatches or
timeouts because events are never processed.
This race is fixed by simply constructing the actual device node path we
expect from the udev device and waiting for the right device.
[1] We rely on the caller to notify us when to remove the device and thus
silently ignore ENODEV.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 29 May 2017 03:20:39 +0000 (13:20 +1000)]
Merge branch 'wip/keyboard-integration-property'
Peter Hutterer [Thu, 25 May 2017 05:34:30 +0000 (15:34 +1000)]
tools: fix minor coding style issue
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 24 May 2017 23:32:13 +0000 (09:32 +1000)]
tools: fix return codes on failure
Leftovers from an earlier version where we had booleans and more function
nesting in the mix. Fix to return integers, and also rename the function name
accordingly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 23 May 2017 03:06:44 +0000 (13:06 +1000)]
Revert "lid: force the lid to open when the keyboard device is removed"
This reverts commit
1e2b66fb9a0de8956abc7d996afdd24a11893eb6.
Peter Hutterer [Mon, 22 May 2017 06:00:20 +0000 (16:00 +1000)]
lid: force the lid to open when the keyboard device is removed
On unreliable tablets (Surface3), always force the lid switch to open when the
paired keyboard is removed. This way the lid can't be stuck in a closed state
when there's nothing attached that can actually trigger that state.
https://bugs.freedesktop.org/show_bug.cgi?id=101100
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Benjamin Tissoires [Fri, 19 May 2017 10:57:23 +0000 (12:57 +0200)]
lid: setup the keyboard notifier when pairing it
On unreliable LID switches, we might have the LID declared as closed
while it is actually not. We can not wait for the first switch event to setup
the keyboard listener: it will never occur.
https://bugs.freedesktop.org/show_bug.cgi?id=101099
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Benjamin Tissoires [Fri, 19 May 2017 10:55:54 +0000 (12:55 +0200)]
lid: track the notifier initial state internally, but not externally
What we do not want is libinput to believe the LID is closed while
it's not. But the internal notifier state need to be in sync with the evdev
node, or it's going to be a pain setting the keyboard listener.
But since we don't know if the state is reliable, we track the internal state
separately from the external state so that we can set up the keyboard listener
when the lid is closed, without having libinput actually send lid closed
events for unreliable devices.
https://bugs.freedesktop.org/show_bug.cgi?id=101099
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 22 May 2017 03:51:11 +0000 (13:51 +1000)]
lid: tighten the lid-keyboard pairing
Only pair if the keyboard is either tagged as internal device.
This has another (unlikely) behaviour change: previously we would override the
paired keyboards with ones that look more accurate (e.g. a usb keyboard paired
before a serial would be unpaired and the serial keyboard takes its place).
Now we assume there can only be one internal keyboard, once we have it we
ignore all others. This shouldn't matter in real life provided the tagging is
correct.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 22 May 2017 03:34:10 +0000 (13:34 +1000)]
evdev: read LIBINPUT_ATTR_KEYBOARD_INTEGRATION property
We have heuristics for detecting whether a keyboard is internal or external,
but in some cases (e.g. Surface 3) these heuristics fail. Add a udev property
that we can apply to these cases so we have something that's reliable.
This will likely eventually become ID_INPUT_KEYBOARD_INTEGRATION as shipped by
systemd, similar to the touchpad property.
https://bugs.freedesktop.org/show_bug.cgi?id=101101
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 22 May 2017 04:28:31 +0000 (14:28 +1000)]
lid: add a comment for why we post the switch state there
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 23 May 2017 03:37:06 +0000 (13:37 +1000)]
Merge branch 'wip/libinput-tool-v2'
Peter Hutterer [Mon, 22 May 2017 04:21:40 +0000 (14:21 +1000)]
test: tighten the wakeup-on-key lid test
Having a litest_wait_for_event_of_type() in there causes us to silently
discard anything but the events we're looking for. This is risky, we want to
make sure that if we re-enable the lid that the key events arrive *after* the
lid open event, not before. So let's not paper over those.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 22 May 2017 04:03:38 +0000 (14:03 +1000)]
test: fix a lid test
We were checking for the empty queue on the wrong context, the default context
got drained a few lines above.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 19 May 2017 05:27:42 +0000 (15:27 +1000)]
Remove write-only CYAPA model tag
Obsolete since we moved pressure into the hwdb in
8d5f4decb4086e2b7982c3cd1e24afd9c11f551f
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 17 May 2017 04:01:02 +0000 (14:01 +1000)]
meson: define the various files litest needs to copy rules/hwdb in place
This was motivated by the need to run the test runner from any directory, so
we need absolute paths to the files we copy.
Unfortunately, we can't get the absolute path from the object returned by
configure_file() and we can't feed that directly into join_paths() either.
So let' make it at least easier to handle: create a configure_file for all the
files we need (so they all end up in builddir/) and simply hardcode the name
for join_paths. Define the lot in config.h, no need to pass compiler flags
around.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 11 May 2017 03:44:36 +0000 (13:44 +1000)]
tools: hook libinput-debug-events into the libinput tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 11 May 2017 03:11:23 +0000 (13:11 +1000)]
tools: add a 'libinput' tool
This tool will eventually replace the different libinput tools we ship atm
with the various functionalities being commands to the single tool, rather
than multiple tools.
Right now, we still build both tools separately.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 11 May 2017 03:52:39 +0000 (13:52 +1000)]
tools: rename a source file to match the future common file name paradigm
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 12 May 2017 03:26:05 +0000 (13:26 +1000)]
tools: drop libshared.la
Include the source files directly, we'll need per-target compiler flags that
affect different tools differently in the future.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Gabriel Laskar [Mon, 15 May 2017 11:08:17 +0000 (13:08 +0200)]
util: harmonize container_of() definition with linux kernel one
commit
3925936 introduced changes to container_of, this is hopefully the
last part of it.
In the linux kernel, container_of() takes a type name, and not a
variable. Without this, in some cases it is needed to declare an unused
variable in order to call container_of().
example:
return container_of(dispatch, struct fallback_dispatch, base);
instead of:
struct fallback_dispatch *p;
return container_of(dispatch, p, base);
This introduce also list_first_entry(), a simple wrapper around
container_of() to retrieve the first element of a non empty list. It
allows to simplify list_for_each() and list_for_each_safe().
Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Gabriel Laskar [Sun, 14 May 2017 14:33:17 +0000 (16:33 +0200)]
udev/hwdb_parser.py: use python3 from env instead of /usr/bin
python installation does not always lives in /usr/bin, this allows to
use virtualenv for example.
Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Gabriel Laskar [Sun, 14 May 2017 14:33:16 +0000 (16:33 +0200)]
util: use offsetof in container_of
gcc and clang supports offsetof (defined in stddef.h) as defined by C99
and POSIX.1-2001, use it in container_of.
Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 14 May 2017 23:02:32 +0000 (09:02 +1000)]
test: make the initial copy file error messages more sensible
This is most likely the first error message a developer encounters when
running the test suite and the /run/udev/rules.d directory already exists.
Make it more meaningful than the current generic integer comparison failure.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 14 May 2017 22:57:27 +0000 (08:57 +1000)]
test: don't use ck_abort_msg outside of test runs
This function used to be called inside a test run a long time ago but moved to
a pre-setup stage without switching to the more generic litest_abort_msg.
The only error message we got is "check_msg.c:80: No messaging setup".
https://github.com/libcheck/check/issues/18#issuecomment-
301217615
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 11 May 2017 03:58:54 +0000 (13:58 +1000)]
Include config.h from event-debug.c
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 11 May 2017 01:39:55 +0000 (11:39 +1000)]
test: install the litest device groups file
We never installed the device groups file for the tests, effectively relying
on a system copy to be installed already.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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>