Commit graph

2686 commits

Author SHA1 Message Date
Peter Hutterer
57a384dfcf tools: remove unnecessary full stop in man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-10 09:34:31 +10:00
Ming-Yang Lu
5dc330bdea touchpad: add upper edge into exclusion zone
This reduces unexpected cursor moves when placing the thumb near the border
of trackpoint buttons and upper edge of touchpad.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-10 09:33:24 +10:00
Peter Hutterer
6a77cae850 touchpad: sync the slot state after tp_resume()
If the touchpad is suspended and resumed (e.g. lid switch), the initial slot
state may be out of sync. If a touch happened while the touchpad was suspended
and the next touch down is on exactly the same x and/or y coordinate, our
touch point would still have the coordinates of the most recently seen touch
(i.e. before touchpad suspend). This could cause a pointer jump or test case
failures.

The real-world impact of this is minimal, putting the finger down in exactly
the same spot is virtually impossible. It could cause a test case failure in the
lid_disable_touchpad() test though, the second touch sequence was on the same
y coordinate and the touch location for that whole sequence was x/0.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-10 09:33:24 +10:00
Peter Hutterer
9ddf8a6421 test: skip double-initialization of all_tests lists
Already done in main(), this here is a leftover from having multiple mains fro
different tests.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-07 09:58:45 +10:00
Peter Hutterer
6060abc3b3 test: fix some tap palm detection tests
Without the timeout we're not guaranteed that the tap button event triggers

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-06 10:26:45 +10:00
Peter Hutterer
50550e9811 test: add missing check for an empty queue to the palm detection test
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-06 10:26:45 +10:00
Peter Hutterer
7e06b47018 test: stop changing argv[0] for forked tests
This was useful when we had a small number of test-forks with the suites
distributed. It helped debug which one is still running and then which suites
are in it. Now that we simply distributed everything across the forks it
doesn't have a lot of usefulness and it interferes with the ability to
backtrace properly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-06 09:33:18 +10:00
Peter Hutterer
a31e4b818c test: remove failing thumb edge scroll test
Broken since the merge of palm pressure detection in
25d54b90d, not sure why the test suite succeeded on that one nonetheless.

I'm not 100% sure why the test does what it does but it seems to be testing
that a wide touch on the side still striggers edge scrolling and not the thumb
detection on the bottom of the touchpad. That is obsolete now, it's hard to
generically figure out the small gap between thumb and palm pressure, so this
test almost always triggers palm detection. It's obsolete.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-06 09:33:18 +10:00
Peter Hutterer
930714a094 doc: update the soname, remove the warning
The soname will remain fixed now, we're going through all the trouble of
having a proper map file so that we don't have to bump it all the time.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-05 11:13:31 +10:00
Peter Hutterer
9b738d0071 doc: fix a few typos
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-05 11:13:31 +10:00
Peter Hutterer
696778cc78 doc: move the autotools instructions into their own section
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-05 11:13:31 +10:00
Peter Hutterer
7b98f8ef47 doc: expand on the meson build instructions
https://bugs.freedesktop.org/show_bug.cgi?id=101686

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-05 09:53:13 +10:00
Peter Hutterer
c6e0c96e74 meson: fix build with --libwacom=false
Triggered an error because we still used dep_libwacom unconditionally:
	Meson encountered an error in file meson.build, line 76, column 0:
	Unknown variable "dep_libwacom".

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-05 09:32:49 +10:00
Peter Hutterer
ca9d6a88d7 Merge branch 'wip/touchpad-palm-pressure' 2017-07-04 13:57:32 +10:00
Peter Hutterer
302aaa548e Drop autotools
This also makes the gitignore files shorter and/or obsolete.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-04 13:44:07 +10:00
Peter Hutterer
d698de6e68 touchpad: send a left button event when we move out of topbuttons and click
We used to completely ignore a finger that was within the top software button
area and then moved to the main area and remained there for a timeout. This
avoids erroneous pointer movements when the user moves the finger while using
the trackpoint.

But we also ignored physical clicks, something we should not be doing. This
patch fixes that behavior: we still ignore the finger for movement, but a
physical click now triggers a left click once we've been in the area for the
timeout.

This new behavior doesn't apply within the timeout, i.e. if a finger is in the
right top button area, moves out and immediately clicks, we still trigger a
right click. This avoids erroneous switches to left-clicks when the finger is
at the edge of the button area and moves out during the press.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-04 13:43:35 +10:00
Peter Hutterer
7c983d6088 udev: add custom pressure range for Dell Latitude E6620
https://bugs.freedesktop.org/show_bug.cgi?id=101670

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-04 12:40:01 +10:00
Peter Hutterer
cf0d442ad3 tools: add a tool to measure touch pressure
And update the documentation for how to use the new tool. It's much more
interactive than evemu and easier to grasp, so let's advertise that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-03 15:58:58 +10:00
Peter Hutterer
25d54b90db touchpad: add pressure-base palm detection
If a touch goes past the fixed pressure threshold it is labelled as a palm and
stays a palm. Default value is one that works well here on a T440 and is
virtually impossible to trigger by a normal finger or thumb. A udev property
is exposed so we can handle this in the udev hwdb and the new tool introduce a
few commits ago can help finding the palm detection threshold.

Unlike the other palm detection features, once a palm goes past the threshold
it remains a palm until the touch is released. This means palm overrides any
other palm detection features. For code simplicity, we don't combine the
states but merely check for pressure before and after the other palm detection
functions. If the pressure triggers, it will trigger before anything else. And
if something else is already active (e.g. edge where the pressure doesn't work
well) it will trigger as soon as the palm is released.

The palm threshold should thus be chosen with some room to spare between the
highest finger pressure.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-03 15:58:13 +10:00
Peter Hutterer
381cce8ddd touchpad: increase palm edge zones to 8%
Most modern touchpads are around 100mm wide, so this provides a ca 8mm edge
zone on each side. The extra 3mm should provide for more reliable palm
detection, a few touches happen to be just on the edge of the 5mm mark.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-03 15:58:13 +10:00
Peter Hutterer
401728a157 configure.ac: libinput 1.8.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-03 15:07:20 +10:00
Peter Hutterer
945122c691 tools: tidy up the libinput man pages again
Make the libinput page more generic but suitable for short attention spans and
most importantly, point to the xf86-input-libinput man page in a more obvious
manner since we're now shadowing that.

The rest of the man pages have punctuation and formatting cleanups only.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-03 15:04:11 +10:00
Peter Hutterer
57e35f4afa README: tidy up the documentation links
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-03 14:43:26 +10:00
Peter Hutterer
5bba2dbb3f tools: add the libinput version to the man pages
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-07-03 11:09:03 +10:00
Peter Hutterer
24ad008294 meson: install the libinput-debug-gui if we build it
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-28 07:20:10 +10:00
Peter Hutterer
1e9ebfa300 README: fix link to libinput-debug-events
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-28 07:20:10 +10:00
Peter Hutterer
98b8fb8f98 configure.ac: libinput 1.7.902
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-26 19:04:08 +10:00
Peter Hutterer
1d52f2f567 tools: fix invocation of subtools
One dash too many. Oops.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-26 18:44:00 +10:00
Peter Hutterer
1cfab540a4 meson: add preceding spaces before colons where needed
Meson does not have a single style but the "foo : bar" style is more common in
the docs and in our meson.build file. Make it consistent.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-26 18:43:59 +10:00
Peter Hutterer
3b2c47a86d test: strdup the suite and test name
The check framework takes and stores the pointer and expects it to be live for
the livetime of the test but it doesn't strdup it. We have to keep those
pointers around ourselves.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-26 18:43:59 +10:00
Peter Hutterer
d1b7b6267c tools: split the configuration option parsing out
We had one shared parsing function for all config options so tools parse
options that don't actually make sense (e.g. --quiet or --show-keycodes for
libinput-list-devices).

This patch splits the actual libinput device configuration out and reshuffles
everything to make use of that. One large patch, because splitting this up is
more confusing than dumping it all.

This means the actual option parsing is partially duplicated between debug-gui
and debug-events but hey, not everything in life is perfect.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-26 18:43:59 +10:00
Peter Hutterer
be7da7f7da touchpad: ignore the tap motion threshold if fingers > slots
Do so on the synaptics serial touchpads at least, they're known to cause
cursor jumps when the third finger is down. Not detecting a tap move means
three-finger taps get more reliable on these touchpads.

This change affects gestures who now effectively have to wait for the tap
timeout to happen. It's a trade-off.

https://bugs.freedesktop.org/show_bug.cgi?id=101435
https://bugzilla.redhat.com/show_bug.cgi?id=1455443

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-26 18:43:59 +10:00
Peter Hutterer
96b885c29a meson: swap libinput dependencies
Since meson commit ae9b238 "ninja: De-dup libraries and use --start/end-group"
we get linker errors with the tools. The duplication is apparently a bit too
agressive, swapping the order here make sure libinput isn't removed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reported-by: Michel Dänzer <michel@daenzer.net>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
2017-06-26 18:43:21 +10:00
Peter Hutterer
ec27aa3a78 Skip restorecon if it cannot be found
https://bugs.freedesktop.org/show_bug.cgi?id=101557

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-23 09:58:42 +10:00
Peter Hutterer
8728b5b38f tools: shorten the --help output for the commands
The full information is now in the man page, the usage() now just tells you
how to use it. This way there's only one place to maintain it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-22 17:48:12 +10:00
Peter Hutterer
933ab0e95f test: remove duplicate test
Copy/paste error, no functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-22 14:53:22 +10:00
Peter Hutterer
f10c0c590c touchpad: update the timestamp even when we only get other axes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-21 19:07:11 +10:00
Peter Hutterer
64f6603ecb touchpad: rename tp_touch->millis to tp_touch->time
This is in µs and hasn't been in ms for a long time.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-21 19:07:11 +10:00
Peter Hutterer
dd25e1799f meson: restore the SELinux context for our .so file on install
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2017-06-21 19:06:46 +10:00
Eric Engestrom
2ee95c7b76 doc: update build instructions for Arch
`abs` has been deprecated, and shut down last month. [1]
`asp` replaces it, so rewrite the instructions to use this instead.

Also, add `--noextract` to the makepkg command, as there is no point
downloading and extracting the sources since they're not going to be
built here.

[1] https://www.archlinux.org/news/deprecation-of-abs/

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-21 08:41:45 +10:00
Peter Hutterer
948cd6ee54 doc: add instructions for handling SELinux denials
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-06-21 08:30:55 +10:00
Peter Hutterer
ca1edce2e1 tools: add the compat scripts installer script to the tarball
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-06-20 16:43:49 +10:00
Peter Hutterer
cca3b5f630 meson: build docs by default, but allow disabling it
This is the behavior of configure as well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-06-20 16:43:49 +10:00
Peter Hutterer
088c3ea16b meson: rename 'enable-tests' option to just 'tests'
All the other config options have a simple true/false as well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-06-20 16:43:49 +10:00
Philippe Coval
4cf9f8bee1 doc: Fix mistake in Matrix example to relect only X along Y axis
On some devices, X coordinate is not working well, like if it is swapped:
click on right, pointer appear on left and vice versa.

To sort this issue, coordinates should be reflected on Y axis:
- new X position is changed (width is subtracted by X position)
- Y is unchanged (it was wrongly set to X)

In landscape (or portrait) mode:

                [  x  ]
                [  y  ]
                [  1  ]
              *    =
  [ -1 0 1  ]   [  x' ] = -x + 0*y + 1*width
  [  0 1 0  ]   [  y' ] = 0*x + 1*y + 0*height
  [  0 0 1  ]   [  1  ]

This was verified using this touch screen (usb="0eef:0001")

  E: ID_VENDOR=eGalax_Inc.
  E: ID_VENDOR_ENC=eGalax\x20Inc.
  E: ID_VENDOR_ID=0eef

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

Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-20 16:43:49 +10:00
Peter Hutterer
d2054c8188 touchpad: use the "is internal keyboard" tag to enable dwt
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-19 15:42:43 +10:00
Peter Hutterer
3a17d0da5e doc: drop the Fedora "ninja-build" note
The packages have been in stable for 6 weeks as of this patch, let's not worry
about the old ones.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-19 13:11:58 +10:00
Peter Hutterer
2887bb4783 tools: assert on malloc failure
No need for proper recovery here in this debugging tool.
Also sneak in a whitespace fix while we're here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-19 12:16:23 +10:00
Peter Hutterer
673d946275 evdev: default to log error priority
Fixes compiler warning:
evdev.c:2899:2: warning: 'pri' may be used uninitialized in this function
[-Wmaybe-uninitialized]

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-19 10:37:36 +10:00
Peter Hutterer
6d27ff38c0 configure.ac: libinput 1.7.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-19 09:32:43 +10:00