Commit graph

2701 commits

Author SHA1 Message Date
Peter Hutterer
7cfb0c7e29 meson: require GTK 3.20
For GDK_SEAT_CAPABILITY_ALL_POINTING

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 8edae4feb6)
2017-10-30 09:42:28 +10:00
Peter Hutterer
eea8888153 touchpad: cap the edge palm detection zones at 8mm
The main purpose of the edge zone is to detect palms in the area where we
cannot assume a full finger size and thus cannot use any other palm detection
mechanism. 8mm should be large enough that a finger should be detected based
on other properties (size, pressure, ...).

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit ed52002c8d)
2017-10-30 09:42:28 +10:00
Peter Hutterer
5521837aaf util: add an extra assert for list_insert()
If we're adding an element that's not null or not a freshly initialized list,
chances are we haven't removed it from a previous list.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
(cherry picked from commit 28ef7456d3)
2017-10-30 09:42:28 +10:00
Peter Hutterer
520789925c test: unref the litest device *after* removing it from the path interface
Our own reference may be the last one that's still alive if the context is
currently suspended (litest_suspend()). If we unref before removing it from
the path interface, we access already freed memory.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 40144321b234f8cee0059cf5bada8c0845065851)
2017-10-30 09:42:28 +10:00
Peter Hutterer
b87487f808 tools: restore default permissions for a source file
This was accidentally made 755 as part of e9fc59efc8

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit c7b2fcd2c947b795039326583f15d29cc42a5fc5)
2017-10-30 09:42:28 +10:00
Peter Hutterer
1d5c60ccf3 Fix meson options default values
The keyword is 'value', not 'default'. With meson 0.43 this now stops
building.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 4bb5ce5b74)
2017-10-30 09:42:27 +10:00
Peter Hutterer
d6c757f8e9 evdev: fix a coverity warning
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 26c4e31bd0f99a2a2be2ed92af8431e720abb0b6)
2017-10-09 11:30:42 +10:00
Peter Hutterer
307f7c6344 lid: mark the write return value as unused
Coverity doesn't understand the (void)write() bit and complains about the
unused value.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-09 11:29:47 +10:00
Peter Hutterer
9d96f50c4d test: silence a coverity warning
Value set but overwritten before use.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 1cf7c88ae6)
2017-10-09 11:14:27 +10:00
Peter Hutterer
04287cb3b7 configure.ac: libinput 1.8.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-04 12:56:10 +10:00
Peter Hutterer
87556848ff Fix make distcheck for missing input-event-codes.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-04 12:56:10 +10:00
Peter Hutterer
77231f1aea test: fix the 'all codes' keyboard device
The ...create() method returned the wrong device, so this one was never
actually used. Once we start using, we get test case failures related to the
device having BTN_foo events as well. For now, just disable those codes so we
have a keyboard with all keys and pass the tests. The rest needs better
fixing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 4c4d400bcb)
2017-10-04 10:49:44 +10:00
Peter Hutterer
622e891354 evdev: update key type check for new key defines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 0c6b5c045b)
2017-10-04 10:49:44 +10:00
Peter Hutterer
d8a838f965 include: sync linux kernel header files with 4.12
To get the new key defines

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 9da2d07409)
2017-10-04 10:49:44 +10:00
Peter Hutterer
318f7fffb3 touchpad: don't resume a disabled touchpad
A touchpad that was disabled by toggling the sendevents option would come back
normally after a lid resume, despite still being nominally disabled.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 53d53dd18e)
2017-10-04 10:48:58 +10:00
Peter Hutterer
a8c40cc29a evdev: accept accelerometers if they are tagged as other devices too
Devices tagged as accelerometers may also be other devices like tablet pads.
Only ignore pure accelerometer devices but disable the accelerometer axes for
devices that have multiple types.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
(cherry picked from commit 7d97bb0087)
2017-10-04 10:48:55 +10:00
Peter Hutterer
ed7ef90534 test: fix pad ring test for small pad ranges
The current tests worked because all rings had the same range, so our error
margin covered for that. With the upcoming MobileStudio Pro 16 pad device, the
range is half and our error margins don't work anymore. Switch to a more
reliable approach that tests every integer value the wheel can send, even
though it relies on kernel filtering.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit e3e6406c4f)
2017-10-03 18:14:19 +10:00
Peter Hutterer
62a9db6ddf test: remove leftover sleep() for debugging in lid switch test
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 34f28a329b)
2017-10-03 18:06:17 +10:00
Peter Hutterer
859e09cb79 tools: remove a leftover debug printf statement
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit e242ad219a)
2017-09-19 15:11:54 +10:00
Peter Hutterer
0df61c76fe configure.ac: libinput 1.8.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-07 16:54:32 +10:00
Peter Hutterer
05c287c16c test: add the gpio-keys device to the Makefile
Fixes distcheck

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-07 16:54:32 +10:00
Peter Hutterer
3d83026c37 gestures: don't try to pinch for nfingers > slots
We don't know the position of the third finger on 2-slot touchpads, differing
between swipe and pinch is reliable. Simply disable 3-finger pinch and always
use swipe; 3fg pinch is uncommon anyway and it's better to have one of the
gestures working reliably than both unreliably.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
(cherry picked from commit 6d435cda06)
2017-09-06 19:40:24 +10:00
Peter Hutterer
a57d0d458f lid: disable all types but EV_SYN and EV_SW
The lid dispatch interface is a one-trick pony and can only handle SW_LID. It
ignores other switches but crashes on any event type other than EV_SW and
EV_SYN. Disable those types so we just ignore the event instead of asserting.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
(cherry picked from commit 6bb05c594a)
2017-09-06 19:39:34 +10:00
Peter Hutterer
582ce30d27 timer: always restart the timer loop when we called one of them
If a timer_func causes the removal or addition of a different timer, our tmp
pointer from the list_for_each_safe may not be valid anymore.

This was triggered by having the debounce code trigger a middle button state
change, which caused that timer to be cancelled.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 6d0edf9d07)
2017-09-06 19:38:49 +10:00
Peter Hutterer
cfb0a39aba timer: if a timer is inactive, do not call the timer func
Race conditions may happen where code that cancels a timer is called just
as that timer triggers. If we cancel a timer, we assume that we've put the
code into a state where the timer firing will trigger a bug.

This could be observed with the middle button code if the release event was
held back just long enough. The button release code cancelled the timer, set
the state back to idle and then complained when the timeout handling sent a
'timeout' event while being in idle.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 696fdff247)
2017-09-06 19:38:43 +10:00
Peter Hutterer
1e89ceb93c evdev: recover from a lost button count
If the kernel sends us a button press for a button that is thought to be down
we have lost track of the state of the button. Ignore the button press event,
in the hope that the next release makes things right again.

A release event may be masked if another process grabs the device for some
period of time, e.g. libinput debug-events --grab.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 399c50dbeb)
2017-09-06 19:38:41 +10:00
Philip Withnall
2d8b79877f build: Add -Iinclude to unit tests
It seems the unit tests rely on another part of <linux/input.h> which I
missed in the previous commit (5cf4b35b).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-21 12:00:36 +10:00
Philip Withnall
1cfae5a4a5 build: Add -Iinclude to libinput and its tools
Various files use #include <linux/input.h> and, if the system input.h is
too old, will fail to compile. Use the internal copy by adding -Iinclude
to the build command lines. This was the case in the old autotools build
system.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-21 12:00:34 +10:00
Jussi Kukkonen
3dffe36854 tools: Fix race in (autotools) install
exec/data distinction is done based on install dir so compat scripts
must be moved in exec hook.

This should fix this occasional failure:
| install: cannot change permissions of
| ‘/usr/bin/libinput-debug-events.compat’: No such file or directory

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-15 09:46:52 +02:00
Peter Hutterer
cc9a4debd3 configure.ac: libinput 1.8.1 2017-07-19 10:01:03 +10:00
Peter Hutterer
c75e052ad4 touchpad: set keyboard to non-active when the keyboard is removed
If the keyboard is removed while dwt thinks it is in active state, that state
is never reset and subsequent touches are ignored.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 9e5d1df4bb)
2017-07-13 15:08:34 +10:00
Peter Hutterer
429fc47bb1 Add support for CircleCI
This isn't currently hooked up to the fdo repo but it's hooked up to my
github mirror. I had SemaphoreCI hooked up to that before but it only
supports ubuntu 14.04 and the recent meson switch made it a bit hard to setup.

CircleCI supports running docker containers, so let's do that and run against
the most recent released Fedora and a recent Ubuntu. I'm not bothering with
rawhide, it's likely to increase the work for little gain when it's in a
semi-broken state.

Run the default build with a few permutations to test meson options. Run
scan-build too but that's just for the logs, eventually this may turn into a
hard failure.

Ubuntu 17.04's meson is too old, so we have to clone that from git. Install
arguments are taken from the meson.deb package.

Most of this effort was done by Benjamin Tissoires.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Cc: Benjamin Tissoires <benjamin.tissoires@gmail.com>
(cherry picked from commit eb36957625)
2017-07-10 15:17:18 +10:00
Peter Hutterer
b6ce9c0f3b 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>
(cherry picked from commit 7b98f8ef47)
2017-07-10 15:16:43 +10:00
Peter Hutterer
40439b7347 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>
(cherry picked from commit c6e0c96e74)
2017-07-10 15:16:39 +10:00
Peter Hutterer
d1a575c8e5 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>
(cherry picked from commit 381cce8ddd)
2017-07-10 15:16:37 +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