Commit graph

170 commits

Author SHA1 Message Date
Peter Hutterer
7e5062f632 doc: update the touchpad pointer acceleration svg
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-12-21 10:55:57 +10:00
Peter Hutterer
ab83c8e626 doc: remove unnecessary linebreak in doxygen file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-11-23 10:42:57 +10:00
Peter Hutterer
e0ccfc87f0 doc: expand trackpoint pointer acceleration documentation a bit
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-11-03 14:01:39 +10:00
Peter Hutterer
33ee8d46e6 doc: add a small page about contributing to libinput
To be expanded at some future time...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-10-25 10:02:07 +10:00
Peter Hutterer
9590fb953f doc: reshuffle the "reporting bugs" page
Split it into several device-specific sections

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-10-19 10:21:51 +10:00
Peter Hutterer
31a168abcd doc: specify the https path for mathjax
freedesktop.org always serves https for the documentation. if Mathjax is
pulled in from http, browsers reject it [1]

Let's take the default doxygen value but just add the https to it. In the
future we should just ship a copy of mathjax with our documentation.

[1] https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content/How_to_fix_website_with_mixed_content

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Wheres-my-beer-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-09-14 16:23:02 +10:00
Peter Hutterer
b519ea4ab5 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>
2016-09-07 11:17:03 +10:00
Peter Hutterer
350112a17e doc: extend build instructions for dependencies
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-09-06 15:34:46 +10:00
Peter Hutterer
b83c754a15 doc: drop HTML_TIMESTAMP
We don't need it and it prevents reproducible builds.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-26 14:12:44 +10:00
Peter Hutterer
60c8b07695 doc: fix wrong argument to udevadm hwdb
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-18 15:34:29 +10:00
Peter Hutterer
a1863b6db8 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>
2016-08-15 08:02:37 +10:00
Peter Hutterer
96b3489f23 Merge branch 'wip/litest-serial-parallel-v3' 2016-08-09 11:18:27 +10:00
Peter Hutterer
e0b36d6da5 doc: add build instructions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-09 10:40:44 +10:00
Peter Hutterer
ae30353a73 doc: add some info about configuring devices in wayland/xorg
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-05 11:14:17 +10:00
Peter Hutterer
6cde53fc1d 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>
2016-08-02 11:32:03 +10:00
Peter Hutterer
eb8e1d4a13 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>
2016-08-02 11:26:58 +10:00
Peter Hutterer
35b28b1af3 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>
2016-08-02 10:19:38 +10:00
Peter Hutterer
35a6ebc536 Merge branch 'wip/tablet-pad-modes-v3' 2016-07-04 10:26:03 +10:00
Peter Hutterer
0526044f6d touchpad: remove software middle button when emulation is enabled
Expose the middle button emulation on software buttons as proper config
option. When enabled, remove the middle button software button area.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-07-04 09:41:33 +10:00
Peter Hutterer
d0ea1855e8 doc: add a section to the FAQ on how to retrigger hwdb changes
I'm typing this way too often into bugreports

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-30 11:00:44 +10:00
Peter Hutterer
6583f4bb53 pad: Add a new API for modes and mode groups
Move mode control to libinput. This reduces some flexibility on what we can do
with modes but makes it a lot easier for anyone to implement modes correctly
and have the LEDs apply appropriately, etc. Let's go with the option to make
the 95% use-case easy. Note: whether the mode is actually used is up to the
caller, e.g.  under Windows and OS X the mode only applies to the
rings/strips, not the buttons.

A tablet pad has 1 or more mode groups, all buttons/ring/strips are assigned
to a mode group. That group has a numeric mode index and is hooked to the
LEDs. libinput will switch the LEDs accordingly.

The mode group is a separate object. This allows for better APIs when it comes
to:
* checking whether a button/ring/strip is part of a mode group
* checking whether a button will trigger a mode transition

and in the future potentially:
* checking which mode transition will happen
* setting which button should change the mode transition
* changing what type of mode transition should happen.
* moving a button from one mode group to the other

This patch adds the basic scaffolding, without any real implementation.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Proofread-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
2016-06-22 11:57:07 +10:00
Peter Hutterer
8aa5576adb doc: add two svgs showing the modes
Separate patch to avoid crowding out the actual content in the patch with the
documentation.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
2016-06-22 08:48:01 +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
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
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
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
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
f44de7cc4f doc: minor fixes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-08 12:49:01 +10:00
Eric Engestrom
7a81ba9cc2 Fix spelling mistakes
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-06 07:42:03 +10:00
Peter Hutterer
886b5a2cd8 touchpad: add a middle button software area
Middle button interaction is most commonly to paste and it is a single-event
interaction (button press). We provided middle button in software button mode
by emulating it with a two-finger press with L+R down at the same time. This
is also what many touchpads are spectacularly bad at, it is very common to
detect the physical button down event before the second finger registers,
resulting in left or right clicks where a middle button should be triggered.

Unless the fingers are resting on the touchpad for at least one scanout, the
success rate for middle button emulation is only at 70% or so.

This patch adds a 25%-width middle button area between the left and the right
software button, everything else stays the same. To avoid immediate breakage,
the middle button emulation remains but may be removed in the future.
The doc is updated to only refer to the middle button area now.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-04-05 10:13:56 +10:00
Peter Hutterer
3d1b17e1fd test: add tablet test for out-of-bounds motion coordinates
The newer Cintiqs have a minimum value of 400/400 advertised by the kernel but
the actual sensor goes past the 0/0 origin. Test this, make sure that a value
outside the boundaries generates negative mm values.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-11 16:03:13 +10:00
Peter Hutterer
9356d9b97d doc: update tablet svg to show tilt as angle
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-10 15:06:12 +10:00
Peter Hutterer
c9abcb2e1c tablet: change tilt axes to use degrees
The Wacom tilt range is 64 degrees so we map everything into that until we
know otherwise.

This commit also switches the tilt axes around to align the angles with the
x/y orientation, i.e. tilting the top of the stylus towards the positive x
axis now generates a positive x tilt.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
2016-02-09 12:19:12 +10:00
Peter Hutterer
3bea95c851 doc: add the tablet support page to the related pages hierarchy
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-02 13:55:01 +10:00
Peter Hutterer
ae41aa146d Merge branch 'master' into tablet-support 2016-01-27 13:54:00 +10:00
Peter Hutterer
cba2278c3a touchpad: add a config option to disable tap-and-drag
There are a number of use-cases where tapping may be desirable, but
tap-and-drag is not, e.g. where tapping is used to select multiple items in a
list. Having tap-and-drag on hinders this, and the nature of the interaction
means it cannot be detected based on timeouts, movement thresholds, etc.

Provide an option instead to turn tap-an-drag off. Tap-and-drag remains
enabled by default (though tapping is disabled by default).

For the touchpad tap state diagram, the new option disables the transition
from state TOUCH to state TAPPED and releases the button immediately instead.
This means that multitap-and-drag is disabled too since we now just loop
around in the single-tap state for multitap.

It also makes tapping more responsive - we don't have to wait for the timeout
before we know whether it's a tap event. The first touch time is noted, we now
send the button press with the time of the first touch and the release with
the time of the release. This ensures a realistic time diff between the two
events.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.netto>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-01-27 10:03:28 +10:00
Peter Hutterer
de3f1fa6fa Merge branch 'master' into tablet-support 2016-01-25 15:29:11 +10:00
Peter Hutterer
7164d6eff5 tablet: hook up relative motion events
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
2016-01-22 16:16:55 +10:00
Peter Hutterer
108a191a3e tablet: add support for relative x/y motion deltas
Instead of an explicit tablet mode that device must be changed into, let the
caller decide which coordinates are preferred. The tablet mode may be
application-specific and usually depends on the tool as well.

This patch adds an interface to get a motion delta for the x/y axes in
pixel-like coordinates. libinput provides some magic to convert the tablet
data into something that resembles pixels from a mouse motion.
For unaccelerated relative motion, the caller should use the mm values from
the tablet and calculate deltas manually.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
2016-01-22 16:16:55 +10:00
Peter Hutterer
a4adea1646 Merge branch 'wip/3-finger-pinch-gesture' 2016-01-20 15:38:17 +10:00
Peter Hutterer
cab2c1640d doc: explain the gesture ambiguity for 2-slot touchpads
Not much we can do about this until we get SMBus/RMI4 in the kernel or better
touchpads in general but this way we can at least point to some official
explanation.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-01-20 15:38:13 +10:00
Peter Hutterer
8234814fe8 gestures: add support for three-finger pinch gestures
https://bugs.freedesktop.org/show_bug.cgi?id=92834

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-01-20 15:38:13 +10:00
Peter Hutterer
91a568d1a1 Merge branch 'master' into tablet-support 2016-01-19 12:02:51 +10:00
Peter Hutterer
41cc9053dd doc: add section names to motion normalization subheaders
Otherwise the first word is used as section header and discarded from the
output.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-01-13 14:11:28 +10:00
Peter Hutterer
1a99977ca0 tablet: a tip event can replace an axis event
When we're only dealing with BTN_TOUCH we can make the tip event independent
of the axis event. Now that we handle pressure thresholds to trigger tip state
this does not work, we'd have to send an axis event with the new pressure and
then a tip event. Since the pressure triggers the tip event this seems
disconnected.

Make the tip event officially capable of carrying axes. A caller can then
decide how to forward this to the next layer.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
2016-01-11 15:17:46 +10:00