Peter Hutterer [Wed, 14 Sep 2016 04:49:55 +0000 (14:49 +1000)]
configure.ac: libinput 1.5.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 14 Sep 2016 01:21:55 +0000 (11:21 +1000)]
udev: fix hwdb match for the HP Stream 11
prefix must be libinput, not evdev
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 6 Sep 2016 22:18:33 +0000 (08:18 +1000)]
touchpad: require at least 3 events before enabling trackpoint palm detection
Some trackpoints, notably the one on the Lenovo T460s have a tendency to send
the odd event even when they're not actually used. Trackpoint events trigger
palm detection (see
0210f1fee193) and thus effectively disable the touchpad,
causing the touchpad to appear nonresponsive.
Fix this by requiring at least 3 events from a trackpoint before palm
detection is enabled. For normal use it's hard enough to trigger a single
event anyway so this should not affect the normal use-case.
https://bugzilla.redhat.com/show_bug.cgi?id=1364850
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Fri, 9 Sep 2016 02:54:01 +0000 (12:54 +1000)]
test: rename SYNAPTICS_CLICKPAD to SYNAPTICS_CLICKPAD_X220
That's where this device comes from. The x220 is special because it's too
small to trigger some of the features, eg. palm detection. Make this more
obvious by changing to a less generic name.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 8 Sep 2016 05:55:47 +0000 (15:55 +1000)]
tools: prefix debug output with '-' on device changes
We print the sysname, but it's not always obvious when there's an event from
another device within the stream from another device. Prefix it so it's easier
to spot and search for.
See https://bugzilla.redhat.com/show_bug.cgi?id=1364850#c3 for an example of
how such an event can hide.
We only use last_device for comparing pointer values so we don't need a
reference to the device, it doesn't matter if the device itself goes out of
scope.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 7 Sep 2016 03:48:45 +0000 (13:48 +1000)]
configure.ac: libinput 1.5rc1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 18 Aug 2016 00:48:31 +0000 (10:48 +1000)]
Force the HP Stream 11 touchpad as a clickpad
INPUT_PROP_BUTTONPAD is not set on this device and RMI4 which should fix this
is a bit too far into the future at this point. Hack around it.
https://bugs.freedesktop.org/show_bug.cgi?id=97147
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 28 Jun 2016 01:28:34 +0000 (11:28 +1000)]
tablet: add touch arbitration
So far we've relied on the wacom kernel module to do touch arbitration for us
but that won't be the case in upcoming kernels. Implement touch arbitration in
userspace by pairing the two devices and suspending the touch device whenever
a tool comes into proximity.
In the future more sophisticated arbitration can be done (e.g. only touches
which are close to the pen) but let's burn that bridge when we have to cross
it.
Note that touch arbitration is "device suspend light", i.e. we leave the
device enabled and the fd is active. Tablet interactions are comparatively
short-lived, so closing the fd and asking logind for a new one every time the
pen changes proximity is suboptimal. Instead, we just keep a boolean around
and discard all events while it is set.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Peter Hutterer [Mon, 5 Sep 2016 05:00:51 +0000 (15:00 +1000)]
evdev: split resetting to a neutral state out
No functional changes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Peter Hutterer [Fri, 2 Sep 2016 04:19:45 +0000 (14:19 +1000)]
test: add litest_assert_touch_sequence helper
Touch sequences are interrupted by TOUCH_FRAME events which makes them
annoying to handle event-by-event.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Peter Hutterer [Wed, 6 Jul 2016 02:54:30 +0000 (12:54 +1000)]
test: move the Intuos 5 and Cintiq 13HD test tablets into the same device group
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Peter Hutterer [Tue, 2 Aug 2016 07:03:54 +0000 (17:03 +1000)]
evdev: release current touches when the device is suspended
Previously suspending a touch device with at least one touch down would never
release the touch point.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Peter Hutterer [Wed, 3 Aug 2016 02:19:54 +0000 (12:19 +1000)]
evdev: don't send frame events if we filtered the touch event
If the touch is inactive the seat_slot is -1 and we filter the event. The same
happens for devices that send may touch events but aren't touch devices like
any touch-capable mouse. In those cases we sent a bunch of 'empty' touch frame
events. Stop this by checking if we actually flushed the respective event.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Peter Hutterer [Wed, 3 Aug 2016 01:58:23 +0000 (11:58 +1000)]
evdev: let the fallback_flush... function decide whether a frame is needed
Rather than testing before if we have an event that matches the need for a
frame simply return the event sent by the flush function. If that event
matches those that need frame events, send the event then.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Peter Hutterer [Tue, 2 Aug 2016 06:37:03 +0000 (16:37 +1000)]
evdev: split out mt event flushing
No functional changes, this is prep work for being able to release touch
points on the fly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Peter Hutterer [Tue, 6 Sep 2016 23:09:04 +0000 (09:09 +1000)]
test: add trackpoint palm detection tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 31 Aug 2016 23:49:24 +0000 (09:49 +1000)]
doc: extend build instructions for dependencies
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 5 Sep 2016 00:02:45 +0000 (10:02 +1000)]
test: add test for touchpad disabling on external mouse
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 4 Sep 2016 22:51:12 +0000 (08:51 +1000)]
udev: fix comment describing permitted match strings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 1 Sep 2016 01:37:45 +0000 (11:37 +1000)]
udev: add missing touchpad model name for the HP 8510w
Peter Hutterer [Mon, 29 Aug 2016 05:14:55 +0000 (15:14 +1000)]
tablet: if a serial comes in late, discard it
If a tool starts reporting with serial 0 and later updates to a real serial,
discard that serial and keep reporting as serial 0. We cannot really change
the tool after proximity in as we don't know when callers query for the serial
(well, we could know but any well-written caller will ask for the serial on
the proximity in event, so what's the point).
Thus if we do get a serial in and the matching tool, check if we have a tool
with the serial 0 already. If so, re-use that. This means we lose correct tool
tracking on such tablets but so far these seem to only be on devices where the
use of multiple tools is unlikely.
https://bugs.freedesktop.org/show_bug.cgi?id=97526
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Peter Hutterer [Mon, 22 Aug 2016 22:00:15 +0000 (08:00 +1000)]
test: change the matrix delta test to use a tip-down event
Makes the test suitable for tablets without proximity capabilities.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Peter Hutterer [Mon, 22 Aug 2016 07:16:21 +0000 (17:16 +1000)]
test: add a Wacom HID 4800 test device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Peter Hutterer [Tue, 30 Aug 2016 07:51:30 +0000 (17:51 +1000)]
evdev: add quirk for the HP85810 touchpad
The touchpad's says it can do two- and three-finger detection but it never
sends events for it. Disable them so we treat it as pure single-finger
touchpad.
https://bugzilla.redhat.com/show_bug.cgi?id=1351285
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 31 Aug 2016 23:55:32 +0000 (09:55 +1000)]
evdev: fix handling of click wheel on parsing errors
Introduced in
b02acd346b, we need to check the angle returned by the parsing
function, not the variable passed in.
Found by Coverity
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 30 Aug 2016 07:50:49 +0000 (17:50 +1000)]
test: add the valgrind test suite output to the distcleanfiles
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reynaldo H. Verdejo Pinochet [Fri, 26 Aug 2016 18:48:17 +0000 (13:48 -0500)]
buildsystem: add missing uninstalled pkg-config infra
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 9 Aug 2016 01:58:16 +0000 (11:58 +1000)]
touchpad: line width fix
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 3 Aug 2016 21:48:19 +0000 (07:48 +1000)]
evdev: recognize and use ID_INPUT_TRACKBALL
We leave the old LIBINPUT_MODEL_TRACKBALL in place until we can rely on
systems to have the new systemd tagging.
https://github.com/systemd/systemd/pull/3872
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Mon, 29 Aug 2016 00:47:08 +0000 (10:47 +1000)]
touchpad: always reset the motion history on finger changes
We've already been doing this for semi-mt devices and for non-clickpads but
let's do it for clickpads as well. On Synaptics touchpads (PS/2 and RMI4)
we see slot jumps where two slots are active, slot X ends but slot Y continues
with the other slot's positional data. This causes a cursor jump on finger
lift after a two-finger scrolling motion. Simply resetting the motion history fixes it.
The only multi-finger interaction where a user could expect perfect fluid
motion is when using a second finger to touch cone of the software button
areas. Let's see if we have complaints first before we implement something
more complex.
https://bugs.freedesktop.org/show_bug.cgi?id=91695
Signed-off-by:Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Mon, 29 Aug 2016 01:56:46 +0000 (11:56 +1000)]
test: prevent cursor jumps in the various tap tests
Probably a copied typo in the original tests, 5 events with 40ms in between
makes less sense than the now-replacement 20 events every 2ms. The previous
one could trigger the cursor jump detection.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 24 Aug 2016 06:22:32 +0000 (16:22 +1000)]
doc: drop HTML_TIMESTAMP
We don't need it and it prevents reproducible builds.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 23 Aug 2016 00:39:16 +0000 (10:39 +1000)]
test: only abort when we fail to add any tests and we have no filters
This prevents any tests from being added but not run in the normal setup. But
as soon as filters are manually specified on the list proceed anyway.
Otherwise it's impossible to run specific sets of tests, e.g. things like
running all tests applicable to a specific device with
--filter-device=foo
Now that all tests are in the same binary we are guaranteed that at least some
tests don't apply, so the above was guaranteed to abort.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 22 Aug 2016 22:11:11 +0000 (08:11 +1000)]
test: add a helper function to compare the event type
New error message prints the human-readable event type, not just the enum
values.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 23 Aug 2016 00:19:56 +0000 (10:19 +1000)]
tablet: fix minor coding style issue
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 22 Aug 2016 06:06:59 +0000 (16:06 +1000)]
touchpad: reset the edge scroll state on touch up if edge scroll is disabled
If a touch was down (and up again) before the device was switched to edge
scrolling, libinput reported an error message:
litest error: libinput bug: unexpected scroll event 0 in area state
While edge scrolling was disabled, any new touch would be set to the area
state but it was never reset on touch release.
https://bugs.freedesktop.org/show_bug.cgi?id=97425
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 16 Aug 2016 04:48:47 +0000 (14:48 +1000)]
Read the horizontal wheel click angle property if available
The Logitech MX master has different click angles for the two wheels.
https://github.com/systemd/systemd/issues/3947
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 4 Aug 2016 05:23:43 +0000 (15:23 +1000)]
touchpad: on a non-clickpad, reset the motion history on nfingers change
The only reason to have more than one finger on a non-clickpad is to tap,
scroll or gesture. In all cases resetting the motion history is a good idea to
avoid jumps moving from 2 to 1 finger.
https://bugs.freedesktop.org/show_bug.cgi?id=97194
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 18 Aug 2016 02:36:41 +0000 (12:36 +1000)]
doc: fix wrong argument to udevadm hwdb
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 21 Jul 2016 04:50:40 +0000 (14:50 +1000)]
test: implement tests for configurable tap button mappings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 21 Jul 2016 04:03:28 +0000 (14:03 +1000)]
touchpad: implement configurable button mapping for tapping
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 21 Jul 2016 01:46:05 +0000 (11:46 +1000)]
Add configurable button map to tappings
The previously hardcoded button map for tapping is 1/2/3 to LRM. But the
middle button is a common feature on the desktop (used for paste, most
prominently) and three-finger tapping is almost impossible to do reliably on
some touchpads (e.g. the T440 has a recognition rate of ~1 in 5).
Left and right buttons have a prominent physical position (either softbuttons
or physical buttons) so make the tap order configurable. Those that require
middle buttons reliably can use the [software] buttons for left/right and
2-finger tap for a middle button.
https://bugs.freedesktop.org/show_bug.cgi?id=96962
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Sun, 14 Aug 2016 21:59:29 +0000 (07:59 +1000)]
doc: split middle button emulation into a separate page
Easier to link to from bug reports
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Jul 2016 06:11:52 +0000 (16:11 +1000)]
evdev: rename all fallback-specific functions to a fallback_ prefix
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Jul 2016 06:02:52 +0000 (16:02 +1000)]
evdev: pass the dispatch interface around
The only places we should typecast from device->dispatch is where we have
external entry points. Everywhere else keep the pointer to the dispatch
interface we already have anyway.
This way we avoid papering over a potential re-use of a function from
non-evdev code, passing in the wrong dispatch.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Jul 2016 05:49:36 +0000 (15:49 +1000)]
evdev: move the abs point into the fallback dispatch
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Jul 2016 05:41:37 +0000 (15:41 +1000)]
evdev: switch three ints to booleans
And a minor rename to make it more obvious
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Jul 2016 05:32:54 +0000 (15:32 +1000)]
evdev: reshuffle the evdev_device struct fields
Have the ungrouped items at the top of the struct for better visibility.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Jul 2016 04:34:56 +0000 (14:34 +1000)]
evdev: split evdev_dispatch and fallback_dispatch into separate entities
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Jul 2016 03:57:01 +0000 (13:57 +1000)]
evdev: move the keyboard mask into the fallback dispatch
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Jul 2016 03:17:58 +0000 (13:17 +1000)]
evdev: move pending_event to the evdev_dispatch struct
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Jul 2016 03:14:17 +0000 (13:14 +1000)]
evdev: move the relative deltas for normal devices to the fallback dispatch
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Jul 2016 03:07:33 +0000 (13:07 +1000)]
evdev: move the mt struct into the evdev dispatch struct
This is only used by the fallback dispatch method, not by any of the others.
Anything dispatch-specific should go into that struct.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Jul 2016 02:59:01 +0000 (12:59 +1000)]
evdev: move axis dimension handling into a single helper function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Jul 2016 02:54:51 +0000 (12:54 +1000)]
evdev: split out slot init
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Jul 2016 02:37:36 +0000 (12:37 +1000)]
evdev: return the dispatch method from evdev_configure_device
Rather than setting a magic device field and returning true/false just return
the dispatch method.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 Jul 2016 02:33:21 +0000 (12:33 +1000)]
evdev: move the fallback dispatch creation to evdev_configure_device
All the other devices are created in there too, unify that approach.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 9 Aug 2016 01:18:27 +0000 (11:18 +1000)]
Merge branch 'wip/litest-serial-parallel-v3'
Peter Hutterer [Tue, 9 Aug 2016 00:25:22 +0000 (10:25 +1000)]
doc: add build instructions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 5 Aug 2016 01:14:17 +0000 (11:14 +1000)]
doc: add some info about configuring devices in wayland/xorg
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 3 Aug 2016 08:30:05 +0000 (18:30 +1000)]
gestures: reduce the 2fg scroll timeout to 150ms
This timeout is there to switch to scrolling when the fingers rest on the
touchpad unmoving and thus avoids the initial scroll threshold for slow
scrolls.
Since the only other gestures we support are swipe (usually a fast movement)
and pinch-and-rotate (also a fast movement) we can drop the timeout down
significantly and thus make the scroll feel more reactive.
https://bugs.freedesktop.org/show_bug.cgi?id=93504
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 4 Aug 2016 00:43:25 +0000 (10:43 +1000)]
touchpad: ignore modifier key combos for dwt
Inspired by the syndaemon -K switch and Anton Lindqvist's patch.
https://patchwork.freedesktop.org/patch/102417/
We already ignored modifiers for dwt. Now we also ignore modifier + key
combinations, i.e. hitting Ctrl+s to save does not trigger dwt, the touchpad
remains immediately usable.
However, if dwt is already active and a modifier combination is pressed, dwt
remains active, i.e. while typing, a shift + key does not disable dwt.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 4 Aug 2016 01:00:37 +0000 (11:00 +1000)]
test: add dwt modifier/fkey test cases
dwt shouldn't trigger on those keys
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 18 Jul 2016 06:06:28 +0000 (16:06 +1000)]
udev: check wacom devices for a paired product id
The newer Wacom Cintiqs have touch devices with a different PID than the pen
device. Use the new libwacom_get_paired_device call where available to pair
the two devices and give them the same device group.
This isn't that important just yet, so no need to force users to update to a
new libwacom version.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Thu, 7 Jul 2016 07:39:37 +0000 (17:39 +1000)]
Include config.h from libinput-util.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 6 Jul 2016 02:34:50 +0000 (12:34 +1000)]
test: just use litest_add_device if we don't have overrides
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 1 Jul 2016 10:42:23 +0000 (20:42 +1000)]
evdev: fix typo "device device"
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 1 Aug 2016 04:09:02 +0000 (14:09 +1000)]
test: if we're in a debugger, use single-fork mode only
Don't fork by default if we're in gdb.
Note that is_debugger_attached() is now inside #ifndef LITEST_NO_MAIN, gdb for
the litest selftest will now require a manual CK_FORK=no.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 1 Aug 2016 04:03:33 +0000 (14:03 +1000)]
test: if a filter is specified, don't parallelize jobs by default
Likely testing a specific set of tests, possibly in gdb. So don't parallelize.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 22 Jul 2016 06:31:25 +0000 (16:31 +1000)]
test: split the tap tests into more tap groups
We're grouping by test suites, so split up the suites a bit further. The tap
tests all have timeouts and thus take forever, splitting them across multiple
forks means we can finish the test suite quicker.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 22 Jul 2016 05:28:37 +0000 (15:28 +1000)]
test: remove NOTPARALLEL
We only have a single test runner now, so no need to restrict it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 22 Jul 2016 05:19:23 +0000 (15:19 +1000)]
test: add a make-like job control to run tests in parallel
Add a make-like -j/--jobs option to split the number of parallel test
processes. Defaults to 8 if not specified, future patches will default this to
1 for special cases where filters are specified or gdb is detected.
Each subprocess overwrites argv[0] to be easier identifiable in the ps
output when we're trying to figure out which tests are still running.
A -j1 is equivalent to the previous functionality, i.e. we don't fork.
One quirk needed for check: any test case not part of a test runner will not
be freed and thus triggers valgrind. We do test filtering by splitting
up the tests across multiple forks (i.e. each process has several tests that
are in the list but not added to the runner). Thus we need to mark those we
expect check to free as used.
Then on cleanup we traverse the test list, add all the unused one to a
test runner and free that test runner (without actually running it). This
cleans up both the filtered tests in each subprocess and the whole test list
in the parent process which doesn't run a test itself.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 1 Aug 2016 04:38:34 +0000 (14:38 +1000)]
test: drop the sysname comparison in the device add/remove test
Running tests in parallel virtually guarantees a different device is added in
between. What we're testing here is that the device comes back and the
original ref doesn't send events, so a false test failure would still indicate
a bug anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 22 Jul 2016 03:30:20 +0000 (13:30 +1000)]
Revert "test: create a lock file to avoid parallel udev reloads during device add"
Not needed anymore, we only have one process creating the udev rules.
This reverts commit
030ec053fbbc17f9bd0a3a8c6003318864986de7.
Peter Hutterer [Tue, 19 Jul 2016 22:45:22 +0000 (08:45 +1000)]
test: restore the hwdb/udev rules on SIGINT
We can't call system() in the signal handler but we are allowed to fork. Do
that, update the hwdb and immediately exit the child again.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 19 Jul 2016 22:43:05 +0000 (08:43 +1000)]
test: make sure we remove all udev rules when we SIGINT the test
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 7 Jul 2016 23:42:36 +0000 (09:42 +1000)]
test: only init the device rules once
The udev hwdb takes about 200ms and we still trigger it on each device. The
udev rules don't actually change after compiling, so simply create them
once and remove them after the test run.
For multiple test binaries this needed to be synchronized (which is hard),
hence the previous merge into a single binary for all tests.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 22 Jul 2016 03:16:49 +0000 (13:16 +1000)]
test: merge all tests into a single binary
Call it a libinput-test-suite-runner, in subsequent patches we'll handle doing
parallel tests ourselves instead of relying on automake features.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 22 Jul 2016 03:23:35 +0000 (13:23 +1000)]
test: store created udev rules in a list for easier deletion
Easier to clean up than knowing all the destination paths we'll install.
Only affects global udev rules so far.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 22 Jul 2016 05:27:49 +0000 (15:27 +1000)]
test: make the valgrind test an actual dependency of the test run
With parallel builds the valgrind test run would run at the same time as the
normal run, the test suite isn't designed for that.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 5 Jul 2016 21:59:31 +0000 (07:59 +1000)]
touchpad: use the udev ID_INPUT_TOUCHPAD_INTEGRATION property if available
udev now labels touchpads as "internal" or "external" for us, use that value
where available and only fall back onto our own labelling if it's missing or
unknown.
systemd commit: https://github.com/systemd/systemd/pull/3638
https://bugs.freedesktop.org/show_bug.cgi?id=96735
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 1 Aug 2016 03:39:34 +0000 (13:39 +1000)]
doc: add links to the two debugging tools as examples
These are the simplest examples on how to use libinput and should be enough to
get any potential user started.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 22 Jul 2016 03:07:38 +0000 (13:07 +1000)]
test: make the interfaces static
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 22 Jul 2016 04:44:54 +0000 (14:44 +1000)]
test: namespace the bitfield helper tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 22 Jul 2016 05:26:45 +0000 (15:26 +1000)]
test: fix prefix for the gestures time test
No real effect, just for consistency.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 20 Jul 2016 09:55:48 +0000 (19:55 +1000)]
udev: don't overwrite a previously set device group
In some cases a device may need a device group assigned by a custom udev rule
or hwdb entry. Don't overwrite that with our generated one.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Fri, 15 Jul 2016 01:31:07 +0000 (11:31 +1000)]
touchpad: change manual calculations of dimensions to helper functions
Wherever we use an absolute size in mm on the touchpad, switch to the new
helper functions. In a few cases we only need one coordinate so just leave the
other one as 0 in those cases.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Fri, 15 Jul 2016 01:04:04 +0000 (11:04 +1000)]
evdev: add helper functions to convert between units and mm
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 21 Jul 2016 06:11:39 +0000 (16:11 +1000)]
evdev: prefix "tablet unknown to libwacom" error with the device name
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 19 Jul 2016 00:16:49 +0000 (10:16 +1000)]
touchpad: change the sanity check function to a bool
And rename to make the return value more obvious
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Peter Hutterer [Tue, 19 Jul 2016 00:05:37 +0000 (10:05 +1000)]
touchpad: change palm detection trigger functions to bools
And rename to make it more obvious what the return value means.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Peter Hutterer [Tue, 19 Jul 2016 00:03:21 +0000 (10:03 +1000)]
touchpad: change clickfinger check distance function to a bool
And rename to make it more obvious what the return value will mean.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Peter Hutterer [Tue, 12 Jul 2016 01:03:03 +0000 (11:03 +1000)]
Switch a bunch of internal functions from int to bool
All these effectively returned bools anyway, switch the signature over to be
less ambiguous.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Peter Hutterer [Tue, 12 Jul 2016 21:55:13 +0000 (07:55 +1000)]
Change a few functions that only ever returned 0 to voids
These are internal functions, if we need them to return an error code we can
change that at any time. Meanwhile, if we only ever return 0 anyway we might
as well just make them voids to save on error paths.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Peter Hutterer [Tue, 12 Jul 2016 21:39:59 +0000 (07:39 +1000)]
evdev_device_suspend() is a void function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Peter Hutterer [Mon, 18 Jul 2016 23:27:50 +0000 (09:27 +1000)]
touchpad: whitespace fix
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 18 Jul 2016 01:17:56 +0000 (11:17 +1000)]
configure.ac: libinput 1.4.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 18 Jul 2016 00:08:16 +0000 (10:08 +1000)]
test: make one ALPS and the Synaptics i2c test devices Dell touchpads
The i2c one came from an Dell XPS13. The ALPS one I can't remember but highly
likely they were on Dells and if not, nothing really changes here anyway
because it's not a clickpad and right now only clickpads have dell-specific
behaviour.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 15 Jul 2016 00:54:05 +0000 (10:54 +1000)]
touchpad: change offset ints to device_coords
No functional changes, just makes the unit more explicit
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Fri, 15 Jul 2016 01:13:06 +0000 (11:13 +1000)]
evdev: constify evdev_device_get_size
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>