platform/upstream/libinput.git
7 years agodoc: add a page "what is libinput"
Peter Hutterer [Mon, 30 Jan 2017 23:45:44 +0000 (09:45 +1000)]
doc: add a page "what is libinput"

This will eventually feature the architecture diagrams, etc. But for now it's
mostly just a list of what will be and what won't be supported.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agodoc: link to tapping page from the FAQ
Peter Hutterer [Mon, 13 Feb 2017 00:31:40 +0000 (10:31 +1000)]
doc: link to tapping page from the FAQ

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agodoc: make the tap-to-click default setting a separate section
Peter Hutterer [Mon, 13 Feb 2017 00:45:47 +0000 (10:45 +1000)]
doc: make the tap-to-click default setting a separate section

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotouchpad: drop 'is blacklisted' check for dwt pairing
Peter Hutterer [Fri, 10 Feb 2017 00:39:25 +0000 (10:39 +1000)]
touchpad: drop 'is blacklisted' check for dwt pairing

dwt is needed on internal touchpads only and those external ones that are a
combo device. This also now gives us the same check for palm detect and dwt.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
7 years agotouchpad: add a hwdb quirk for (external) touchpad/keyboard combos
Peter Hutterer [Fri, 10 Feb 2017 00:30:38 +0000 (10:30 +1000)]
touchpad: add a hwdb quirk for (external) touchpad/keyboard combos

Specify the layout of the combo so we know when to initialize palm detection.

This allows us to drop palm detection on external touchpads otherwise,
replacing the wacom-specific check with something more generic..

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
7 years agoMerge branch 'gcov-tests'
Peter Hutterer [Thu, 9 Feb 2017 02:27:39 +0000 (12:27 +1000)]
Merge branch 'gcov-tests'

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add tests for tablet tool types
Peter Hutterer [Thu, 9 Feb 2017 01:09:11 +0000 (11:09 +1000)]
test: add tests for tablet tool types

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add helper functions to filter an event
Peter Hutterer [Thu, 9 Feb 2017 01:06:01 +0000 (11:06 +1000)]
test: add helper functions to filter an event

Simplest implementation for what we need right now, it turns off an event on
the evdev device and turns it back on again. This allows us to change bits in
the 'normal' event stream, such as changing the tool type without triggering
proximity events for the BTN_TOOL_PEN that all test devices send by default.

This won't work for absolute devices because we need to re-enable with a
struct input_absinfo. But we don't need that ability for now anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add basic test for getting the physical seat name
Peter Hutterer [Thu, 9 Feb 2017 00:32:02 +0000 (10:32 +1000)]
test: add basic test for getting the physical seat name

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoevdev: split calibration property parsing into a helper
Peter Hutterer [Thu, 9 Feb 2017 00:25:50 +0000 (10:25 +1000)]
evdev: split calibration property parsing into a helper

So we can test it externally.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agopath: parse the WL_OUTPUT property for patch devices too
Peter Hutterer [Wed, 8 Feb 2017 23:43:54 +0000 (09:43 +1000)]
path: parse the WL_OUTPUT property for patch devices too

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoevdev: free the output name on evdev_destroy()
Peter Hutterer [Thu, 9 Feb 2017 01:53:44 +0000 (11:53 +1000)]
evdev: free the output name on evdev_destroy()

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotouchpad: mark the Apple onebutton touchpad as clickfinger-default
Peter Hutterer [Mon, 9 Jan 2017 23:22:16 +0000 (09:22 +1000)]
touchpad: mark the Apple onebutton touchpad as clickfinger-default

We don't initialize click methods on devices with physical buttons. This model
is a special case, it's not a clickpad but it only has one button (because one
button is all you ever need and whatnot).

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agopad: don't warn about failure to initialize the LEDs on litest devices
Peter Hutterer [Wed, 8 Feb 2017 22:55:10 +0000 (08:55 +1000)]
pad: don't warn about failure to initialize the LEDs on litest devices

We don't init the required /sysfs files, so let's not spew a lot of warnings
during the test suite.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotouchpad: expand top middle button to cover 40mm to 60mm
Peter Hutterer [Tue, 7 Feb 2017 23:53:44 +0000 (09:53 +1000)]
touchpad: expand top middle button to cover 40mm to 60mm

42 and 58 were within the middle button already, 40/60 are more accurate
values.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoconfigure.ac: bump to 1.6.900
Peter Hutterer [Wed, 8 Feb 2017 03:47:51 +0000 (13:47 +1000)]
configure.ac: bump to 1.6.900

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add test for touch seat slots
Peter Hutterer [Mon, 6 Feb 2017 01:47:56 +0000 (11:47 +1000)]
test: add test for touch seat slots

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoSwap the return values for unsupported scroll button configs
Peter Hutterer [Mon, 6 Feb 2017 01:23:18 +0000 (11:23 +1000)]
Swap the return values for unsupported scroll button configs

Usually we reply INVALID before we reply UNSUPPORTED but that's only for those
values where the value is a programming error. But in this case it's a bit
more complicated. INVALID is only for the cases where the button doesn't exist
on the device, if we don't have button scrolling at all then we have
UNSUPPORTED for all.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add test for setting pointer accel profiles on no-accel devices
Peter Hutterer [Mon, 6 Feb 2017 01:06:48 +0000 (11:06 +1000)]
test: add test for setting pointer accel profiles on no-accel devices

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: test click method setting on non-touchpads
Peter Hutterer [Mon, 6 Feb 2017 01:03:43 +0000 (11:03 +1000)]
test: test click method setting on non-touchpads

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add test for pad event mode groups
Peter Hutterer [Mon, 6 Feb 2017 01:00:43 +0000 (11:00 +1000)]
test: add test for pad event mode groups

Not much we can do here, our virtual devices don't have the sysfs files
required, so they have 0 modes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add missing checks for tap enabled/disabled by default
Peter Hutterer [Mon, 6 Feb 2017 00:51:25 +0000 (10:51 +1000)]
test: add missing checks for tap enabled/disabled by default

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add test for natural scroll defaults on no-scroll devices
Peter Hutterer [Mon, 6 Feb 2017 00:48:13 +0000 (10:48 +1000)]
test: add test for natural scroll defaults on no-scroll devices

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add test for default button tap map (on non-tapping devices)
Peter Hutterer [Mon, 6 Feb 2017 00:45:21 +0000 (10:45 +1000)]
test: add test for default button tap map (on non-tapping devices)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoMerge branch 'touchpad-pressure-based-v2'
Peter Hutterer [Fri, 3 Feb 2017 01:41:04 +0000 (11:41 +1000)]
Merge branch 'touchpad-pressure-based-v2'

7 years agotest: fix ranged test for 'no device' tests
Peter Hutterer [Thu, 2 Feb 2017 04:17:50 +0000 (14:17 +1000)]
test: fix ranged test for 'no device' tests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agopath: remove unncessary declaration
Peter Hutterer [Wed, 1 Feb 2017 06:34:02 +0000 (16:34 +1000)]
path: remove unncessary declaration

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agopath: remove unused declaration of path_input_process_event
Peter Hutterer [Wed, 1 Feb 2017 06:21:31 +0000 (16:21 +1000)]
path: remove unused declaration of path_input_process_event

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoRevert "touchpad: reduce the initial timeout for tapping after touch"
Peter Hutterer [Wed, 1 Feb 2017 04:48:11 +0000 (14:48 +1000)]
Revert "touchpad: reduce the initial timeout for tapping after touch"

The timeout is too short, a number of users are unable to tap now.

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

This reverts commit d0ba1e2b383acaac8a31a1ded7d3039bcd161db3.

7 years agoMerge branch 'wip/switch-interface'
Peter Hutterer [Wed, 1 Feb 2017 03:56:32 +0000 (13:56 +1000)]
Merge branch 'wip/switch-interface'

7 years agotest: fail before zero division
Peter Hutterer [Wed, 1 Feb 2017 03:12:40 +0000 (13:12 +1000)]
test: fail before zero division

Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: fix tablet tool_id test to fail on unexpected ids
Peter Hutterer [Wed, 1 Feb 2017 03:11:23 +0000 (13:11 +1000)]
test: fix tablet tool_id test to fail on unexpected ids

Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotouchpad: remove unnecessary return statement
Peter Hutterer [Mon, 30 Jan 2017 23:56:39 +0000 (09:56 +1000)]
touchpad: remove unnecessary return statement

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoevdev: fix a comment typo
Peter Hutterer [Tue, 31 Jan 2017 00:06:32 +0000 (10:06 +1000)]
evdev: fix a comment typo

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agodoc: add a table of contents to the FAQ
Peter Hutterer [Mon, 30 Jan 2017 23:46:53 +0000 (09:46 +1000)]
doc: add a table of contents to the FAQ

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoMerge branch 'tablet-pad-modes-kernel'
Peter Hutterer [Mon, 30 Jan 2017 23:07:01 +0000 (09:07 +1000)]
Merge branch 'tablet-pad-modes-kernel'

7 years agoevdev: add a wrapper to get the evdev device from a libinput device
Peter Hutterer [Mon, 30 Jan 2017 09:48:33 +0000 (19:48 +1000)]
evdev: add a wrapper to get the evdev device from a libinput device

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoevdev: improve type-safety on dispatch switches
Peter Hutterer [Mon, 30 Jan 2017 08:01:09 +0000 (18:01 +1000)]
evdev: improve type-safety on dispatch switches

Set the dispatch type on creation, then check that whenever we try to get the
dispatch struct. This avoids a potential mismatch between the backends.

Plus, use of container_of means we're not dependent on the exact layout
anymore.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoswitch: for surface 3 tablets, write the lid open to the device
Peter Hutterer [Mon, 30 Jan 2017 02:58:37 +0000 (12:58 +1000)]
switch: for surface 3 tablets, write the lid open to the device

These tablets only ever give us a close event, the open event is broken. So
when we detect keyboard events, fix the kernel device's state by writing the
event to the fd.

We still sync the lid state manually, in case this fails and we don't get the
SW_LID through the normal event sequence. If it works fine, the real open
event will just be ignored.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: fix two test udev rules
Peter Hutterer [Mon, 30 Jan 2017 03:27:40 +0000 (13:27 +1000)]
test: fix two test udev rules

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoudev: mark all laptops as lid switch reliable
Peter Hutterer [Wed, 25 Jan 2017 07:41:54 +0000 (17:41 +1000)]
udev: mark all laptops as lid switch reliable

If the chassis type is 9 or 10 (Laptop, Notebook) let's assume that our lid
switch works. On anything else we leave it at unknown.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: fix two test udev rules
Peter Hutterer [Mon, 30 Jan 2017 03:27:40 +0000 (13:27 +1000)]
test: fix two test udev rules

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add touchpad pressure tests
Peter Hutterer [Wed, 11 Jan 2017 04:48:39 +0000 (14:48 +1000)]
test: add touchpad pressure tests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotouchpad: use pressure values for touch is-down decision
Peter Hutterer [Tue, 10 Jan 2017 05:58:21 +0000 (15:58 +1000)]
touchpad: use pressure values for touch is-down decision

Don't rely on BTN_TOUCH for "finger down", the value for that is hardcoded in
the kernel and not always suitable. Some devices need a different value to
avoid reacting to accidental touches or hovering fingers.

Implement a basic Schmitt trigger, same as we have in the synaptics driver. We
also take the default values from there but these will likely see some
updates.

A special case is when we have more fingers down than slots. Since we can't
detect the pressure on fake fingers (we only get a bit for 'is down') we
assume that *all* fingers are down with sufficient pressure. It's too much of
a niche case to have this work any other way.

This patch drops the handling of ABS_DISTANCE because it's simply not needed
anymore.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add the right pressure bits.
Peter Hutterer [Thu, 12 Jan 2017 03:30:08 +0000 (13:30 +1000)]
test: add the right pressure bits.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: make sure touch up resets pressure
Peter Hutterer [Mon, 23 Jan 2017 02:04:20 +0000 (12:04 +1000)]
test: make sure touch up resets pressure

Should be overridden by the test devices where something more fine-grained is
needed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agodoc: update the FAQ entry with how config options are stored
Peter Hutterer [Fri, 27 Jan 2017 04:34:39 +0000 (14:34 +1000)]
doc: update the FAQ entry with how config options are stored

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: switch the semi-mt devices to use the litest semi-mt handling
Peter Hutterer [Thu, 19 Jan 2017 07:35:04 +0000 (17:35 +1000)]
test: switch the semi-mt devices to use the litest semi-mt handling

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: handle semi-mt devices in litest
Peter Hutterer [Thu, 19 Jan 2017 05:58:13 +0000 (15:58 +1000)]
test: handle semi-mt devices in litest

Don't rely on the devices to handle themselves, just handle it globally

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: convert event handling while loops into for loops
Peter Hutterer [Thu, 19 Jan 2017 06:52:04 +0000 (16:52 +1000)]
test: convert event handling while loops into for loops

No functional changes, just enables us to use 'continue' instead of piling up
negated conditions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: allow nesting of litest_push_event_frame()
Peter Hutterer [Thu, 19 Jan 2017 07:20:19 +0000 (17:20 +1000)]
test: allow nesting of litest_push_event_frame()

Right now, we fail if we call litest_push_event_frame() when already inside a
frame. For the semi-mt handling we need to do exactly that though, so turn it
into a counting semaphore instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotouchpad: ignore hovering touches when tapping
Peter Hutterer [Wed, 11 Jan 2017 06:12:47 +0000 (16:12 +1000)]
touchpad: ignore hovering touches when tapping

We need to remember whether a tap was down or just hovering, otherwise we mess
up the state machine when we send tap release events for taps that never
switched to TOUCH_BEGIN. This is quick fix, really we should have a new state
here, but that's a lot harder to implement.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: force a pressure of 0 when we hover a touch
Peter Hutterer [Tue, 10 Jan 2017 23:49:37 +0000 (09:49 +1000)]
test: force a pressure of 0 when we hover a touch

As we switch to pressure-based touch detection, we need for all
pressure-capable touchpads to send pressure values. They'll do so by filling
in an axis default but that breaks our current hover code.

Make sure the hover litest helpers force a pressure of 0.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add two more touch..._extended functions
Peter Hutterer [Wed, 11 Jan 2017 04:48:11 +0000 (14:48 +1000)]
test: add two more touch..._extended functions

So we can set pressure during touch sequences

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoswitch: hook up to keyboard events to fix the lid switch state
Peter Hutterer [Wed, 25 Jan 2017 05:21:52 +0000 (15:21 +1000)]
switch: hook up to keyboard events to fix the lid switch state

Extra insurance against broken lid switches. Listen to events from the
(internal) keyboard when we are logically closed. If any, assume we're open
after all and update accordingly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoAdd a helper function for initializing an event listener
Peter Hutterer [Wed, 25 Jan 2017 05:19:50 +0000 (15:19 +1000)]
Add a helper function for initializing an event listener

Not needed right now as everything assumes the listener was added before it
was removed. This helper is for the cases where we may call listener_remove
before it was ever added.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoswitch: move the lid switch bits into their own file
Peter Hutterer [Wed, 25 Jan 2017 04:31:05 +0000 (14:31 +1000)]
switch: move the lid switch bits into their own file

Keep this separate from the other code so it's easier to read

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoswitch: only sync the initial state if we know the state is reliable
Peter Hutterer [Wed, 25 Jan 2017 03:24:31 +0000 (13:24 +1000)]
switch: only sync the initial state if we know the state is reliable

This changes the default behavior to "disable the touchpad on the first lid
close event", thus filtering any laptops where the switch state is buggy and
always in "on" state. Devices where we know the lid switch state is
reliable can be marked as such.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoswitch: prevent switches to send the same event twice
Peter Hutterer [Wed, 25 Jan 2017 03:48:01 +0000 (13:48 +1000)]
switch: prevent switches to send the same event twice

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoswitch: sync the initial state of the switch on startup
Peter Hutterer [Tue, 24 Jan 2017 05:04:39 +0000 (15:04 +1000)]
switch: sync the initial state of the switch on startup

This is the default behavior, based on the theory of hardware actually doing
the right thing. That's not always the case, follow-up patches will change
when we do the theoretically ideal thing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoClarify the default 'off' position of a switch
Peter Hutterer [Tue, 24 Jan 2017 04:58:17 +0000 (14:58 +1000)]
Clarify the default 'off' position of a switch

So we don't need to send an "off" event for every switch on startup.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotouchpad: check for a switch type before handling the event
Peter Hutterer [Tue, 24 Jan 2017 02:16:08 +0000 (12:16 +1000)]
touchpad: check for a switch type before handling the event

Don't call get_switch_event immediately, doing so for non-switch events is
documented as a bug. Check the event type instead, if that one is correct then
we can assume the rest works.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoevdev: move the lid switch process functions together
Peter Hutterer [Tue, 24 Jan 2017 02:14:01 +0000 (12:14 +1000)]
evdev: move the lid switch process functions together

Don't sprinkle them across the file

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add tests for lid switch
James Ye [Fri, 20 Jan 2017 05:54:16 +0000 (16:54 +1100)]
test: add tests for lid switch

Ship a custom udev rule for the test device until systemd v333 is commonplace.

Signed-off-by: James Ye <jye836@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoPair touchpad and lid_switch for disable
James Ye [Fri, 20 Jan 2017 05:54:15 +0000 (16:54 +1100)]
Pair touchpad and lid_switch for disable

Add listener for lid switch events, disable touchpad on switch event.

Signed-off-by: James Ye <jye836@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoAdd evdev_dispatch interface for lid switch
James Ye [Fri, 20 Jan 2017 05:54:14 +0000 (16:54 +1100)]
Add evdev_dispatch interface for lid switch

Create a lid_switch_interface to handle lid switch events, so the touchpad can
be disabled when lid is closed.

Signed-off-by: James Ye <jye836@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoAdd a "switch" interface for parts of the SW_* range
James Ye [Fri, 20 Jan 2017 05:54:13 +0000 (16:54 +1100)]
Add a "switch" interface for parts of the SW_* range

This will allow switch devices known to libinput to be exposed. Currently,
this is SW_LID.

libinput also handles switch events internally, e.g. a laptop touchpad will
be disabled autmoatically when the lid is closed. This is transparent to
the caller, although the caller will also receive the event. See
https://bugs.freedesktop.org/show_bug.cgi?id=86223
This features is intended to be the main driver for the interface.

Co-Authored-By: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: James Ye <jye836@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoautogen.sh: exec the configure script
Peter Hutterer [Thu, 26 Jan 2017 04:31:19 +0000 (14:31 +1000)]
autogen.sh: exec the configure script

No point in waiting for it here, might as well pass the baton.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoautogen: add default patch prefix
Mihail Konev [Thu, 26 Jan 2017 04:00:21 +0000 (14:00 +1000)]
autogen: add default patch prefix

Signed-off-by: Mihail Konev <k.mvc@ya.ru>
7 years agotouchpad: use a helper function for the libinput context
Peter Hutterer [Wed, 25 Jan 2017 05:19:22 +0000 (15:19 +1000)]
touchpad: use a helper function for the libinput context

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoevdev: fix an error message
Peter Hutterer [Wed, 25 Jan 2017 03:03:28 +0000 (13:03 +1000)]
evdev: fix an error message

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoDrop normalized_get_direction, use physical distances instead
Peter Hutterer [Mon, 23 Jan 2017 00:43:04 +0000 (10:43 +1000)]
Drop normalized_get_direction, use physical distances instead

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
7 years agotouchpad: convert normalized_length to physical coordinates
Peter Hutterer [Mon, 23 Jan 2017 00:29:56 +0000 (10:29 +1000)]
touchpad: convert normalized_length to physical coordinates

Now that the acceleration code doesn't use dpi-normalized coordinates anymore,
we don't need to use them in the touchpad code. Switch to physical distances
instead, it makes debugging a lot saner.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
7 years agotouchpad: mask out ABS_MT if we don't have or disable MT
Peter Hutterer [Sun, 22 Jan 2017 23:55:03 +0000 (09:55 +1000)]
touchpad: mask out ABS_MT if we don't have or disable MT

Make sure the events we deal with are the ones we actually honor. This reduces
the chance that we accidentally process events we weren't event supposed to
get based on some earlier device decision.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
7 years agopad: implement kernel-based pad led handling
Peter Hutterer [Mon, 11 Jul 2016 05:39:57 +0000 (15:39 +1000)]
pad: implement kernel-based pad led handling

For each device open the various led devices (brightness only) and map the one
nonzero brightness to the current mode.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoMerge branch 'wip/wheel-tilt-source'
Peter Hutterer [Fri, 20 Jan 2017 02:33:53 +0000 (12:33 +1000)]
Merge branch 'wip/wheel-tilt-source'

7 years agotest: add wheel tilt tests
Peter Hutterer [Mon, 28 Nov 2016 01:08:01 +0000 (11:08 +1000)]
test: add wheel tilt tests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
7 years agoMerge branch 'gcov'
Peter Hutterer [Fri, 20 Jan 2017 00:35:55 +0000 (10:35 +1000)]
Merge branch 'gcov'

7 years agotest: add test to set tap map on unsupported devices
Peter Hutterer [Mon, 16 Jan 2017 05:00:00 +0000 (15:00 +1000)]
test: add test to set tap map on unsupported devices

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: check the pad button state in litest_is_pad_button_event
Peter Hutterer [Mon, 16 Jan 2017 04:51:19 +0000 (14:51 +1000)]
test: check the pad button state in litest_is_pad_button_event

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add tests for tablet buttons and button seat count
Peter Hutterer [Mon, 16 Jan 2017 04:50:07 +0000 (14:50 +1000)]
test: add tests for tablet buttons and button seat count

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add more tests for tap-drag config
Peter Hutterer [Mon, 16 Jan 2017 04:34:57 +0000 (14:34 +1000)]
test: add more tests for tap-drag config

Including one to get/set it on unsupported devices

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: ad calls to check whether pressure has changed
Peter Hutterer [Mon, 16 Jan 2017 04:23:49 +0000 (14:23 +1000)]
test: ad calls to check whether pressure has changed

Nothing actually called that function, sprinkle a few calls into existing
tests to make sure it actually works.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: test absence of scroll events on keyboards
Peter Hutterer [Mon, 16 Jan 2017 04:20:23 +0000 (14:20 +1000)]
test: test absence of scroll events on keyboards

Executes the paths to set invalid scroll methods.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add device size/no size checks
Peter Hutterer [Fri, 13 Jan 2017 07:01:33 +0000 (17:01 +1000)]
test: add device size/no size checks

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add a test for the tool ID
Peter Hutterer [Mon, 16 Jan 2017 00:57:56 +0000 (10:57 +1000)]
test: add a test for the tool ID

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add a test for tablet pad event timestamps
Peter Hutterer [Mon, 16 Jan 2017 00:51:10 +0000 (10:51 +1000)]
test: add a test for tablet pad event timestamps

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add test for tablet_tool_get/set_user_data
Peter Hutterer [Sun, 15 Jan 2017 23:29:29 +0000 (09:29 +1000)]
test: add test for tablet_tool_get/set_user_data

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add a tablet tool capability check
Peter Hutterer [Fri, 13 Jan 2017 06:44:15 +0000 (16:44 +1000)]
test: add a tablet tool capability check

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add a test to force a destroy for the path backend
Peter Hutterer [Fri, 13 Jan 2017 05:57:45 +0000 (15:57 +1000)]
test: add a test to force a destroy for the path backend

The test suite (and tests) we have now all clean up nicely before calling the
final libinput_unref(). Add one where there's at least one device still
connected.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add some device capability checks
Peter Hutterer [Fri, 13 Jan 2017 05:50:23 +0000 (15:50 +1000)]
test: add some device capability checks

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add test for fetching invalid pointer axes
Peter Hutterer [Fri, 13 Jan 2017 05:44:33 +0000 (15:44 +1000)]
test: add test for fetching invalid pointer axes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: test for libinput_device_get/set_user_data
Peter Hutterer [Fri, 13 Jan 2017 05:39:07 +0000 (15:39 +1000)]
test: test for libinput_device_get/set_user_data

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add tests for checking for buttons for a non-pointer device
Peter Hutterer [Fri, 13 Jan 2017 02:18:43 +0000 (12:18 +1000)]
test: add tests for checking for buttons for a non-pointer device

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoutil: make all property parsing helpers ignore NULL strings
Peter Hutterer [Fri, 13 Jan 2017 02:03:29 +0000 (12:03 +1000)]
util: make all property parsing helpers ignore NULL strings

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add test for invalid path operations on udev backends
Peter Hutterer [Fri, 13 Jan 2017 01:46:38 +0000 (11:46 +1000)]
test: add test for invalid path operations on udev backends

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add test for invalid udev_assign_seat on path context
Peter Hutterer [Fri, 13 Jan 2017 01:28:47 +0000 (11:28 +1000)]
test: add test for invalid udev_assign_seat on path context

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add helper function to install a "bug expected" log handler
Peter Hutterer [Fri, 13 Jan 2017 01:44:28 +0000 (11:44 +1000)]
test: add helper function to install a "bug expected" log handler

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agotest: add a test for keyboard LED updates
Peter Hutterer [Fri, 13 Jan 2017 01:24:14 +0000 (11:24 +1000)]
test: add a test for keyboard LED updates

Not much we can check for here anyway, but at least we can trigger the code.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
7 years agoHook up gcov for coverage reports
Peter Hutterer [Thu, 5 Jan 2017 05:21:24 +0000 (15:21 +1000)]
Hook up gcov for coverage reports

./configure --enable-gcov adds the required flags to link everything ready for
gcov. A new make gcov target runs the test suite, then pulls all the gcov bits
together into ./test/gcov-reports/ including a summary file.

The script to pull everything out is used in libevdev too, we just have an
extra condition here to ignore the selftest gcov bits (it overwrites the
useful litest.c coverage output).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>