Commit graph

2049 commits

Author SHA1 Message Date
Peter Hutterer
b2cd0c27bb test: make the valgrind target depend on 'all'
Make sure we rebuild before running valgrind, everything else is a waste of
time.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-16 12:09:25 +10:00
Peter Hutterer
7860a9ed77 touchpad: stop palm detection when a second finger is detected
This avoids accidental palm detection during two-finger scrolling if one
finger is inside the edge exclusion zone.

Palm detection is designed to avoid accidental touches while typing. If a
non-palm finger is on the touchpad already the user is unlikely to be typing.
So stop palm detection in this case and process the fingers as normal.

This implementation has a minor bug: if both palm touches start within the
palm exclusion zone within the same frame, neither will be labelled as palm
due to how we check the other touches. Since this is an extremeley niche case
we can live with that.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-06-15 10:23:18 +10:00
Peter Hutterer
4bb0adfc1c touchpad: split palm movement detection into a helper function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-06-15 10:23:18 +10:00
Peter Hutterer
92b21247f4 touchpad: don't warn about kernel jumps on semi-mt devices
These devices are all over the place anyway, no need to spam the log, just
silently discard the jumps.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-06-13 08:15:41 +10:00
Peter Hutterer
f71329d0d8 pad: add helper function to access the libinput context
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-10 06:57:41 +10:00
Peter Hutterer
3824e161ed tablet: add helper function to access the libinput context
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-10 06:57:41 +10:00
Peter Hutterer
45d23a6b0e evdev: add helper to get the libinput context from the evdev device
And change the various callers, especially those where we only had the
separate struct for indentation purposes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-10 06:57:41 +10:00
Peter Hutterer
48d82ed3ea touchpad: use the tp_libinput_context() helper
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-10 06:57:41 +10:00
Peter Hutterer
c781ef2eb3 evdev: check model flags for actual booleans
The hwdb doesn't allow unsetting a property so once we start nesting model
flags it'll become important to be able to be able to unset one as well (by
assigning it to 0).

So rather than checking for existence, check whether the property is actually
set to something resembling a boolean.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-06-10 06:57:35 +10:00
Peter Hutterer
a914e253fc pad: change button map ordering
BTN_A and above sort after BTN_BASE

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-08 17:24:22 +10:00
Peter Hutterer
8cf2b5f8a3 test: start the pad button tests at BTN_0
Oops, we didn't actually check the button mapping for most pads...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-08 11:38:22 +10:00
Peter Hutterer
b90e2e8c43 pad: group the button state into a private struct
This is only set on button events so use the same approach as for rings and
strips. No functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-06-08 11:36:45 +10:00
Peter Hutterer
27078b2667 touchpad: restore the hysteresis by default
A large part of the bugs seen right now are related to touchpads jittering too
much. Fixing them one by one is entertaining, but time consuming. Right now
the number of touchpads that require a hysteresis seem to outnumber those that
don't, so switch the approach around: leave the hysteresis in place but
disable it for those touchpads that don't need it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-06-06 09:00:14 +10:00
Peter Hutterer
b2772abb46 tools: print button/ring/strip info for pads
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-02 12:42:19 +10:00
Peter Hutterer
4f8088066c tools: show tablet-pad capabilities in libinput-list-devices
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-02 12:40:22 +10:00
Peter Hutterer
34eff6564d tools: add missing space after listing touch/tablet capabilities
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-02 12:40:19 +10:00
Peter Hutterer
7af58883f5 doc: add a check to compare local files with those in the makefile
Avoid forgetting about adding svgs/dotfiles to the Makefile.am

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-02 09:11:11 +10:00
Peter Hutterer
890b3c34a4 doc: ship the doc sources even when not building with docs
No effect so far because the dist-hook prevents us from making a tarball
without the sources anyway. But for correctness split the two up.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-02 09:11:11 +10:00
Peter Hutterer
faf7a6107f touchpad: warn if we have invalid touchpad ranges
Quite a few bugs are caused by touchpad ranges being out of whack. If we get
input events significantly outside the expected range (5% width/height as
error margin) print a warning to the log.

And add a new doc page to explain what is happening and how to fix it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-06-02 08:01:43 +10:00
Peter Hutterer
031b7fb79b touchpad: short-circuit the edge scroll handling when it's not enabled
No need to handle events properly in the edge scroll state machine when it's
not enabled. Just set any beginning touch to state AREA and move on. The rest
of the code guarantees neutral state when edge scrolling is enabled or
disabled.

This reduces the debug output produced by libinput-debug-events when edge
scrolling is disabled, preventing users from seemingly identifying
bugs where there are none.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-06-01 15:31:43 +10:00
Peter Hutterer
cf707baace tablet: up the reference count for the tool in the event
Make sure that the tool is valid while the event is valid, even if the device
gets destroyed before the event is destroyed.

This cannot actually be triggered right now, the event has a ref to the device
and the tools do not get removed until the device is destroyed. But for future
implementations (e.g. where the tool is otherwise automatically destroyed on
proximity out) we need to ensure the tool remains valid for the event
lifetime.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-30 16:10:12 +10:00
Peter Hutterer
83b0f3c4f3 touchpad: fix link in error message - add missing '.html'
https://bugs.freedesktop.org/show_bug.cgi?id=96191

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-30 16:10:12 +10:00
Peter Hutterer
e3e8d83457 tools: print the rotation angle in libinput-list-devices
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-30 15:36:46 +10:00
Peter Hutterer
7aa6b40f31 udev: mark the Logitech M570 as trackball
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-30 15:36:46 +10:00
Peter Hutterer
f929aff6c6 tools: add missing space in libinput-list-devices output
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-30 15:36:46 +10:00
Peter Hutterer
377046ee39 doc: grammar fix in the Makefile
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-27 13:02:53 +10:00
Peter Hutterer
8d80aae784 doc: add the missing svg files to the Makefile.am
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-27 13:02:48 +10:00
Peter Hutterer
7f9c1f1c6c doc: sort the svg files alphabetically
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-27 13:02:43 +10:00
Peter Hutterer
0933650f66 pad: ignore EV_MSC events
The Wacom Express Key Remote sends the serial number via EV_MSC. At some later
point we'll need the serial to match the LEDs correctly but for now we can
ignore them.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-27 13:02:30 +10:00
Peter Hutterer
7b73269d74 tools: print the pad capabilities
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 08:45:29 +10:00
Peter Hutterer
40e3fe2384 doc: update ref/unref behavior for the tablet tool
Brings it in line with the rest of libinput.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-24 14:40:48 +10:00
Peter Hutterer
c2dfe504ed doc: update doc to explicitly state that the seat isn't referenced
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-24 14:40:44 +10:00
Peter Hutterer
e1915b53b5 Drop the ALPS_RUSHMORE tag
Was only used for the touchpad hysteresis, we can re-use the wobbly touchpad
tag for this.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-23 14:56:15 +10:00
Peter Hutterer
cebbe0c2da udev: mark ALPS touchpads fw version 300 as wobbly touchpads
Includes the Dell Lattitude E5420 but since all alps touchpads with the same
fw version are the same (as far as we know) hooking this off the firmware
version should cover this generation.

https://bugzilla.redhat.com/show_bug.cgi?id=1336084

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-23 14:56:15 +10:00
Peter Hutterer
595b5f6ae7 udev: add the Yoga 2 to the wobbly touchpads
https://bugs.freedesktop.org/show_bug.cgi?id=95290

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-23 14:55:02 +10:00
Peter Hutterer
41b9078eec test: skip manually setting uinput resolution if it's already set
If we have libevdev 1.5 or later, the resolution is already set, no need to
change it again. Let's rely on libevdev to do the right thing and simply skip
the rest if we have one correct nonzero resolution already set on the device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-20 09:58:19 +10:00
Peter Hutterer
5f4f211d6d doc: fix a few typos
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-19 17:24:00 +10:00
Peter Hutterer
f6fc03ab12 test: fix a couple of touchpad tests that triggered the cursor jump warning
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-19 09:06:36 +10:00
Peter Hutterer
58f4058cf7 touchpad: disable cursor jump detection for Wacom tablets
We haven't seen jumps on Wacom tablets yet and they cause error messages in
most of the tests. litest uses a scaling approach for most events, so a finger
move that moves from 30% to 80% of the touchpad with can easily trigger a jump
on a Wacom tablet due to its physical size.

Rather than having to fix up all tests for the larger size (and potentially
cover some other bugs) simply disable this test for Wacom tablets.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-19 09:06:36 +10:00
Peter Hutterer
2f5231cc88 touchpad: only use negative pressure change check on Lenovo *50 and *60 series
This was introduced for bug 94379 - an X1 Carbon 3rd. Other touchpads have
different pressure change ranges, causing this condition to trigger
randomly and resulting in a jerky pointer motion.

For now, reduce the check to the *50 and *60 series touchpads until we have
data for more touchpads that we can add one-by-one.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-18 07:35:36 +10:00
Peter Hutterer
8527242ed9 evdev: the range between dpad and trigger-happy are keys, not buttons
Affected keys:
	KEY_ALS_TOGGLE
	KEY_BUTTONCONFIG
	KEY_TASKMANAGER
	KEY_JOURNAL
	KEY_CONTROLPANEL
	KEY_APPSELECT
	KEY_SCREENSAVER
	KEY_VOICECOMMAND
	KEY_BRIGHTNESS_MIN
	KEY_BRIGHTNESS_MAX
	KEY_KBDINPUTASSIST_PREV
	KEY_KBDINPUTASSIST_NEXT
	KEY_KBDINPUTASSIST_PREVGROUP
	KEY_KBDINPUTASSIST_NEXTGROUP
	KEY_KBDINPUTASSIST_ACCEPT
	KEY_KBDINPUTASSIST_CANCEL

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-17 07:58:15 +10:00
Peter Hutterer
fb5a97211b test: add a keyboard test device with all codes enabled
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-17 07:58:15 +10:00
Peter Hutterer
50a86cceb4 Add configure.ac check for static_assert
Part of C11, defined via assert.h.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Tested-by: Baruch Siach <baruch@tkos.co.il>
2016-05-17 06:47:56 +10:00
Peter Hutterer
1c276f7f4a Merge branch 'wip/trackball-rotation' 2016-05-16 09:22:15 +10:00
Peter Hutterer
d1a8a92184 Add support for relative device rotation (trackball only)
Trackballs are effectively stationary devices and can be positioned at any
rotation. They are also employed by users with impaired dexterity which
sometimes implies that they are positioned at an non-default angle to make the
buttons easier to reach.

Add a config option for rotation for trackball devices. Currently only
supported for 90-degree angles, if there is a need we can add more angles
later.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-16 09:21:38 +10:00
Peter Hutterer
98ee1791ca gestures: don't send swipe gestures when gestures are disabled
Introduced in 6ad303b as part of an code flow optimization, causing any 3+
finger gesture to be posted as swipe gesture, even when gestures are disabled.
However, the event is filtered in the higher levels with a bug message printed
to the log.

Don't post swipe gestures for devices where gestures are disabled.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-16 08:18:59 +10:00
Peter Hutterer
a683b62781 configure.ac: move libunwind/addr2line test to inside the test conditions
If we're not building the tests, we don't care about libinwind/addr2line.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-10 15:45:56 +10:00
Peter Hutterer
dfd9517f5a configure.ac: libinput 1.3.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-10 13:53:24 +10:00
Peter Hutterer
87550f8dc9 doc: add an entry about tablets in left-handed mode
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-09 11:45:01 +10:00
Peter Hutterer
3ff302694e configure.ac: libinput 1.3rc3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-04 19:15:42 +10:00