Commit graph

3056 commits

Author SHA1 Message Date
Peter Hutterer
aca0e3729a tools: libinput-record: add gesture support
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-19 16:04:41 +10:00
Peter Hutterer
da02cdffd4 tools: yaml verifier: allow for SYN_REPORT value 1
This is generated by the kernel's autorepeat code, see input_repeat_key() in
drivers/input/input.c

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-19 15:10:43 +10:00
Peter Hutterer
41704028d3 tools: yaml verifier: add POINTER_AXIS to allowed events types
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-19 15:10:15 +10:00
Daniel van Vugt
d5b4558675 Improve responsiveness for Apple Magic Trackpad
The touch size threshold was too high, so occasionally libinput would
think the finger had lifted when it hadn't and events would be ignored.

Similarly, the palm threshold was too low, so occasionally libinput would
think a heavy single finger was a palm and ignored that too.

This fixes both of those issues.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-19 10:53:34 +10:00
Peter Hutterer
1bd5869f19 filter: duplicate the pointer_accelerator struct into the bits that use it
Yeah, it's duplication. But this way it's also separation and we can't
accidentally use the wrong struct.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 17:10:05 +10:00
Peter Hutterer
31a21c0028 filter: namespace the various trackers_* functions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 17:01:03 +10:00
Peter Hutterer
d8e8b74b06 filter: split the mouse acceleration out into a separate file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:52:00 +10:00
Peter Hutterer
f02c9b9734 filter: drop the ntrackers argument from init_trackers
Reduces the duplication, everyone uses the same value anyway

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:42:58 +10:00
Peter Hutterer
cae84b84ae filter: tidy up the touchpad filter
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:33:56 +10:00
Peter Hutterer
6135e1d878 filter: split the low-dpi acceleration into a separate file
Plenty of duplication there from the normal filter.c, but that also makes it
less likely to break if we adjust the other one.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:24:52 +10:00
Peter Hutterer
f61adfcf9b filter: move the flat filter into a separate file
This also fixes a bug with the _noop function, because we casted to the wrong
struct the dpi value was garbage.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:15:38 +10:00
Peter Hutterer
e3554f38f8 filter: move the velocity diff to the only function we use it in
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:15:38 +10:00
Peter Hutterer
b887353ab9 filter: split the touchpad acceleration code into a separate file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:15:38 +10:00
Peter Hutterer
40c5b64f82 filter: make the simpsons accel calculation available through the header
This is the standard approach for mice and touchpads to calculate the
acceleration based on the last two deltas, let's make that code shareable.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:15:38 +10:00
Peter Hutterer
0ead929838 filter: move the pointer_accelerator struct into the header
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:15:38 +10:00
Peter Hutterer
477f51b6bd filter: split trackpoint acceleration code into a separate file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:15:38 +10:00
Peter Hutterer
f79b2d4df4 filter: split the tablet accel code into a separate file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:15:38 +10:00
Peter Hutterer
d857e36c33 filter: move the x230 filter into a separate file
There's a fair bit of duplication of code from filter.c but it's not worth
disecting this and optimising it. The device is 5 years old now, we don't want
to touch this accel method so duplication is good here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:15:38 +10:00
Peter Hutterer
228d0497b7 filter: add helper function to reset and free trackers
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:15:38 +10:00
Peter Hutterer
3f53430ea1 filter: pass trackers to calculate_velocity
So the function to calculate the velocity is easier to call from other sites.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:15:38 +10:00
Peter Hutterer
acb4168053 filter: move the smoothing values to the trackers
This way we can pass them around easier without needing the whole
pointer_accelerator struct (which in theory is device-type specific). The
values relate to the calculation of the delta between trackers anyway, so
logically this is where they belong.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:15:38 +10:00
Peter Hutterer
69d0d188a7 filter: move some functions to the shared header
Prep work for splitting things up better

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:15:38 +10:00
Peter Hutterer
0dcd401485 filter: factor out the pointer trackers from the accel filter
No functional changes, just refactoring

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:15:38 +10:00
Peter Hutterer
bcdd722929 meson: re-use the filter source list
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 16:15:38 +10:00
Peter Hutterer
0dccaa8a42 udev: add the P50 to the T450 jumping motion quirks
On slow finger motion, this device also sends a bunch of events with only
pressure updates, followed by a massive coordinate jump. Enable the quirk so
we skip that jump.

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

This patch was initially applied as ab55302ef and reverted as e8cb7e4523.
Turns out the issues are unrelated to this patch, so let's re-apply it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 15:35:51 +10:00
Peter Hutterer
2857cfe87d test: use a udev monitor to wait for a device to disappear
Reduces potential race conditions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 14:36:31 +10:00
Peter Hutterer
fb8a5b040a test: replace a strcmp with streq
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 14:36:31 +10:00
Peter Hutterer
358acb5747 test: remove double check for empty queue
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 14:36:31 +10:00
Davide Depau
5feaa5f00c evdev: don't suspend keyboard on ThinkPad X1 Yoga 1st in tablet mode
When the X1 Yoga is in tablet mode, one capacitative touch button (windows
key, sends KEY_LEFTMETA) and two side volume buttons are accessible on the
front. The key event comes through the internal keyboard that we disabled in
tablet mode so it stops working.

Luckily the Yoga physically disables the "main" keyboard when in tablet mode,
so all we have to do is skip our code to disable the keyboard and the keys are
working again.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-18 14:36:31 +10:00
Sean Lanigan
5aec854ac3 Add Dell XPS13 L322X touchpad quirks
Signed-off-by: Sean Lanigan <sean@lano.id.au>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-17 10:08:29 +10:00
Peter Hutterer
ea52b0d575 Revert "Add Dell XPS13 L322X touchpad quirks"
The current match doesn't capture all L322X devices, the 'pn' element of
the dmi modalias can read 'pnXPSL322X' or 'pnDellSystemXPSL322X'.
Reverting in favour of the following patch.

This reverts commit 69fe467fba.

https://bugs.freedesktop.org/show_bug.cgi?id=104990
2018-04-17 10:06:22 +10:00
Peter Hutterer
08d85350cb test: add a test for a touchscreen with out-of-range axes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-16 17:04:46 +10:00
Peter Hutterer
108b85cae0 doc: add a description of the internal architecture
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-16 15:14:23 +10:00
Peter Hutterer
b2fb2adefa Remove some duplicate empty lines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-16 15:14:23 +10:00
Peter Hutterer
8a223e739b Drop the libinput-list-devices and libinput-debug-events compat scripts
Added in 1.8, let's drop them for 1.11

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 14:58:46 +10:00
Peter Hutterer
e428e5e87a meson: only run the selinux restore script on meson < 0.43
Meson handles this now, see meson commits 1826872 and follow-up c63aa037.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 14:58:46 +10:00
Sean Lanigan
69fe467fba Add Dell XPS13 L322X touchpad quirks
https://bugs.freedesktop.org/show_bug.cgi?id=104990

Signed-off-by: Sean Lanigan <sean@lano.id.au>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 11:15:04 +10:00
Peter Hutterer
e9c53e09cf doc: add a section on what happens when a bug was resolved
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 10:45:09 +10:00
Peter Hutterer
b0a0627ae2 evdev: add a run-time check to avoid re-using model flags
Only runs on the LIBINPUT_MODEL_* flags, the ID_INPUT_TRACKBALL flag is an
exception.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 09:31:45 +10:00
Peter Hutterer
f37c1dc66a evdev: remove duplicate MODEL entry in the model parsing
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 09:30:33 +10:00
Peter Hutterer
23614f7551 debounce: disable debouncing on the Logitech K400
This is an external keyboard+touchpad but not recognised as touchpad by the
kernel so it's in mouse emulation mode. Double-taps are sent with impossibly
close timestamps and filtered out by the debouncing code. Since this isn't a
real button that can wear out anyway, let's just disable debouncing on this
device.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-13 09:29:36 +10:00
Peter Hutterer
3651495798 doc: expand the "reporting bugs" page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-12 14:18:09 +10:00
Peter Hutterer
3ec8eb7f30 tools: fix switch case-statement indentation
We don't indent the 'case FOO:' lines in libinput

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-12 11:59:46 +10:00
Peter Hutterer
7525aea272 evdev: return an error if the profile change failed
If we get to this point, we've already ruled out invalid arguments and this
shouldn't really fail, so let's reply with UNSUPPORTED instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-12 11:45:58 +10:00
Peter Hutterer
fde4255f29 evdev: break up a long line
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-12 11:45:55 +10:00
Tim Richardson
dd6059aefc evdev: fix duplicated flag value
edit: Luckily there's no overlap between the users of those two flags so this
didn't trigger any bugs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-12 08:48:22 +10:00
Peter Hutterer
e8cb7e4523 Revert "udev: add the P50 to the T450 jumping motion quirks"
Apparently this negatively affects scrolling behavior.

https://bugs.freedesktop.org/show_bug.cgi?id=105022#c38

This reverts commit ab55302ef8.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-10 08:55:56 +10:00
Peter Hutterer
8eb41b432e doc: axis overrides need to go to systemd, not libinput
And remove the double-slash in the error message pointing here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-10 08:00:35 +10:00
Peter Hutterer
6964047a67 doc: debugging touchpad pressure/size ranges is interactive
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-09 10:51:40 +10:00
Peter Hutterer
1531c9dc88 test: call K_OFF when run on the vt
Slight disadvantage: this breaks Ctrl+C to cancel the test suite. Still
potentially better than injecting random events into your vt.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-04-06 10:35:36 +10:00