Commit graph

1999 commits

Author SHA1 Message Date
Peter Hutterer
8a415e486a Add tagging of trackballs
Currently unused, but oh, the possibilities...

The only thing we have to go on for trackballs at the moment is whether they
have "Trackball" in the name string. All others need to be manually tagged.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-03 17:17:28 +10:00
Peter Hutterer
4d2724d022 evdev: de-duplicate the model property->model flag list
Rather than a list where the only difference is the LIBINPUT_MODEL vs
EVDEV_MODEL prefix, use a macro.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-05-03 17:16:47 +10:00
Peter Hutterer
cbb95cf56e test: add a missing empty line
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-03 15:10:01 +10:00
Peter Hutterer
d8e92b3e45 evdev: log the applied model flags in debug mode
Makes it a lot easier to figure out if the udev properties are set up
correctly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-03 15:10:01 +10:00
Peter Hutterer
dc7570f047 Constify two matrix multiplication helpers
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-03 13:44:04 +10:00
Peter Hutterer
df42e9aebc doc: add an overview of the various configuration options
It's a bit hard to find what can be configured in the wall of text that is the
doxygen output. Add a TOC of the various options so it's easy to get a quick
grasp.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-03 09:09:34 +10:00
Peter Hutterer
b94b40206b doc: add missing @ingroup tag to the accel profile enum
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-03 08:50:23 +10:00
Peter Hutterer
6a22eed4ef touchpad: detect and warn about kernel tracking pointer jumps
If a touch moves by more than 20mm within a single frame, reset the motion
history, effectively discarding the movement. This is a relatively common bug
and almost always needs a kernel fix, so add an explanatory page to the docs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-28 10:01:20 +10:00
Peter Hutterer
774be50e68 test: use a few more events for some of the tests with large pointer movements
Don't move across the touchpad in one single event, it looks like a cursor
jump that we're trying to detect in future patches.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-28 10:01:20 +10:00
Peter Hutterer
4fdaa1b2a9 Make a link to the html docs available as a #define
The "latest" documentation link is the location for the master branch,
released versions have their own directory on the server.

The micro-versions of 90 and above are used for snapshots and release
candidates, so whenever we have a micro version of >= 90 we still want to link
to the "latest" documentation. In all other cases, we link to the current
release.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-28 10:01:20 +10:00
Peter Hutterer
4552d686f8 tablet: fix distance normalization range after 25a9f39
25a9f39 changed the range to [-1, 1] but that's incorrect for the distance
values. Split the normalization up into two functions and make sure our
distance range is correct.

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

And while we're at it, sneak in a test for pressure ranges too.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
2016-04-28 09:23:27 +10:00
Peter Hutterer
248912f1ef touchpad: exclude Logitech touchpads from disable-while-typing
Logitech does not sell internal touchpads, the closest ones are the TK820 and
the K400 series devices. Neither of which need DWT, the touchpad is next to
the keyboard.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-22 12:13:26 +10:00
Peter Hutterer
46c2fdd522 configure.ac: libinput 1.3rc2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-21 15:56:04 +10:00
Peter Hutterer
f3170ab724 Fix distcheck
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-21 15:21:08 +10:00
Peter Hutterer
5bcde0f89c configure.ac: libinput 1.3rc1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-19 15:19:34 +10:00
Peter Hutterer
7da1e5fe9c tools: draw some grids for positioning testing in the event-gui
Having a grid makes it easier to detect pointer jumps

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-19 15:19:34 +10:00
Peter Hutterer
9ebcc45345 test: drop the hand-enumerated device values
C guarantees that an enum value is previous value+1, so we might as well start
at -1000 and not have to worry about the actual values.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-18 13:45:47 +10:00
Peter Hutterer
064c72a52a Merge branch 'wip/tablet-pad-support' 2016-04-18 13:31:46 +10:00
Peter Hutterer
83771f1b17 fixup! Add the LIBINPUT_DEVICE_CAP_TABLET_PAD capability and matching interface 2016-04-18 13:23:39 +10:00
Peter Hutterer
d82cfa1d53 test: tablet pad tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
2016-04-18 09:12:02 +10:00
Peter Hutterer
8e17a9ab5c pad: implement wacom pad support
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
2016-04-18 09:12:02 +10:00
Peter Hutterer
c2c526a7c5 doc: add a graphic illustrating pad vs tool support
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
2016-04-18 09:12:02 +10:00
Peter Hutterer
b2a3706948 Add the LIBINPUT_DEVICE_CAP_TABLET_PAD capability and matching interface
This interface handles the buttons on the physical tablet itself, including
the touch ring and the strip.

A notable difference to other libinput interfaces here is that we do not use
linux/input.h event codes for buttons. Instead, the buttons are merely
numbered sequentially, starting at button 1. This means:
* the API is different, instead of get_button() we have get_button_number() to
  drive the point home
* there is no seat button count. pads are inherently different devices and
  compositors should treat them as such. The seat button count makes sense
  when you want to know how many devices have BTN_LEFT down, but it makes no
  sense for buttons where all the semantics are handled by the compositor
  anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
2016-04-18 09:12:02 +10:00
Peter Hutterer
61e58a4c1f tablet: move the libwacom check for left-handed-ness into a helper function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
2016-04-18 09:11:59 +10:00
Peter Hutterer
fcc9a2bf18 evdev: always defuzz absolute touchscreens
If a touchscreen has a fuzz value use it for motion hysteresis similar to how
we do it for a touchpad. This stops pointer wobbles as seen in
https://bugs.freedesktop.org/show_bug.cgi?id=94918

It's up to the system to override or set the kernel's fuzz value correctly,
i.e. a udev hwdb entry is required where the kernel driver does not set it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-04-18 08:40:42 +10:00
Peter Hutterer
b31618b25b evdev: use a slot variable instead of dereferencing everywhere
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-04-18 08:40:42 +10:00
Peter Hutterer
ef4e96de58 evdev: rename slot to slot_idx
No functional changes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-04-18 08:40:41 +10:00
Peter Hutterer
df879a6c4f evdev: move the hysteresis code to a more generic location
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-04-18 08:40:41 +10:00
Peter Hutterer
49b8d4ec44 test: drop slot events from the singletouch device
We don't have that bit set anyway

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-15 14:28:45 +10:00
Peter Hutterer
afdcaf5015 touchpad: add LIBINPUT_MODEL_WOBBLY_TOUCHPAD for the HP 14-ac157tu
If some elantech touchpads require a hysteresis, let's use some more generic
tag for those touchpads that require correct handling of pointer wobbles.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-15 10:46:54 +10:00
Peter Frühberger
f00b5d609c touchpad: enlarge top button area by a factor 3 instead of 1.5
When the touchpad is disabled, the top software button on the Lenovo T440
series touchpads currently enlarge by a factor of 1.5 (to 15mm). This is not
enough, a user has to rotate the wrist quite uncomfortable when using
the left mouse button.

When the touchpad itself is off anyway we can extend the size of the top
software buttons to the factor 3, i.e. 30mm.

Signed-off-by: Peter Frühberger <peter.fruehberger@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-15 10:33:48 +10:00
Peter Hutterer
1662384b43 Merge branch 'wip/trackpoint-mb-emu-scrolling' 2016-04-14 10:48:41 +10:00
Peter Hutterer
115c512241 test: add test to ensure MB emulation doesn't start while the MB is down
We already handle the case where we have MB emulation active and a middle
button is pressed because we often don't know if we have a middle button on
the device.

But the other way round makes little sense, when a physical middle button is
down emulation should not engage. Test for this.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-14 10:48:26 +10:00
Peter Hutterer
c61dfc80bd evdev: enable middle-button scrolling on middle-button emulation
https://bugs.freedesktop.org/show_bug.cgi?id=94856

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-14 10:48:26 +10:00
Peter Hutterer
aeb0c21b1c evdev: split scroll button state check out
Rather than checking the physical key's state, set a flag for the button to be
down. This enables us to use non-physical buttons (middle button emulation).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-14 10:48:21 +10:00
Peter Hutterer
d76263a00f evdev: if we have a quick scroll button release, skip middle button emulation
The only difference between evdev_pointer_notify_physical_button() and
evdev_pointer_notify_button() is that the former filters out middle button
emulations where applicable.

Doing so effectively disables using a button for scrolling that is also used
for middle button emulation. This is intentional, it is a niche use-case
(and prone to timer races). OTOH some devices exist that only have two buttons
on the pointing stick and require button scrolling. This use-case is given
preference.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-14 10:48:14 +10:00
Peter Hutterer
4f74f8e685 test: add test for no scroll events before the scroll button timeout
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-14 10:47:58 +10:00
Peter Hutterer
8ebe33827e udev: update the hwdb matches to avoid use of ( and )
libudev's util_replace_chars() replaces the () with underscores so that match
would work too but let's use ? instead to make it look like a regex.

This now activates the rules for all cyapa touchpads, before they wouldn't
have applied to any device.

https://bugs.freedesktop.org/show_bug.cgi?id=93846#c12

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-14 08:56:36 +10:00
Peter Hutterer
60a8ba9f3e tablet: add a fuzz-filter to avoid spamming callers with subpixel updates
This is especially a problem for the cursor tool which can be legitimately
left on the tablet. It wobbles by a couple of device units, resulting in
continuous axis updates to the caller. Pre-filter any of these events by the
axis' fuzz value so we don't even process them.

For ABS_DISTANCE which doesn't have a fuzz we hard-code a minimum fuzz of 2.
This should eventually land in the kernel though.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
2016-04-13 08:13:47 +10:00
Peter Hutterer
592b6d2cb7 test: set the umask before msktemp to silence coverity
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-13 07:03:48 +10:00
Peter Hutterer
817328e171 tools: update the doc publish tool to take a subdir
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-12 07:56:52 +10:00
Peter Hutterer
25a9f394fc tablet: fix the airbrush slider range
Supposed to be [-1, 1] but we only generated [0, 1]

Reported-by: Carlos Garnacho <carlosg@gnome.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Carlos Garnacho <carlosg@gnome.org>
2016-04-12 05:59:00 +10:00
Peter Hutterer
5152d94cd2 timer: print the wrong offset when we have a negative timer offset bug
Makes it easier to determine if this is a libinput bug or something triggered
by the caller waiting too long to call libinput_dispatch().

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-11 13:02:19 +10:00
Jonas Ådahl
c830f51b2e test-pointer: Test that the default accel profile doesn't change
Make sure that changing the accel profile doesn't affect the default
accel profile.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-11 07:53:45 +10:00
Jonas Ådahl
ee6501d12f libinput: Actually return the default accel profile
We just returned the current profile instead of the default one. Fix
that.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-11 07:53:38 +10:00
Jonas Ådahl
240d669bba test: Handle 32 bit msec time overflows
The libinput_*_get_time() returns a 32 bit unsigned integer, but in the
tests we compared them to a 64 bit unsigned integer. This means that
when the 32 bit integer overflowed, we'd still compare to a
non-overflowed 64 bit integer, causing the tests to fail.

This commit fixes this by always casting the millisecond 64 bit unsigned
integer to a 32 unsigned integer, triggering the same overflow.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-11 07:53:25 +10:00
Peter Hutterer
f44de7cc4f doc: minor fixes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-08 12:49:01 +10:00
Peter Hutterer
abcb99a597 test: fix printf for unexpected tablet events
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-08 11:11:19 +10:00
Peter Hutterer
ecd6a0803e tools: print the button name for tablet button events
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-08 11:11:15 +10:00
Peter Hutterer
c420747be4 test: reduce the default abs-max range to avoid ENOMEM
This path is hit when we set up an abs device without setting specific axis
ranges. Usually because we only care that the axis is there, not the values,
see the tests of invalid devices.

0xffff is fine as max for most axes but setting it for ABS_MT_SLOT can cause
allocation errors. Reduce to 100 because we don't care about the range anyway
and 100 is still big enough for basic tests.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-08 08:05:52 +10:00