Peter Hutterer [Wed, 16 May 2018 01:56:12 +0000 (11:56 +1000)]
test: assume Wacom devices are external touchpads
Same as the code itself does.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 15 May 2018 04:53:51 +0000 (14:53 +1000)]
tools: ptraccel-debug: match the help with the actual trackpoint range value
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 15 May 2018 04:18:46 +0000 (14:18 +1000)]
Update the README and the graphs showing libinput in the stack
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 26 Apr 2018 01:47:54 +0000 (11:47 +1000)]
touchpad: add a tool to measure the touchpad fuzz
Well, I say "measure" but really at this point it just reads the
properties/axes and then does it's best to auto-generate a hwdb entry that
matches the user's hardware and sets a fuzz value on the device. Ideally this
reduces the number of hand-holding required in bugzillas. There are plenty of
things that can go wrong, so our fallback is still to throw up our hands and
point to the documentation.
https://bugs.freedesktop.org/show_bug.cgi?id=98839
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Veli-Jussi Raitila [Fri, 11 May 2018 09:26:16 +0000 (12:26 +0300)]
Add quirk to fix spurious palm detections on MacBook Pro (13-inch, Mid 2009)
https://bugzilla.redhat.com/show_bug.cgi?id=
1575260
https://bugs.freedesktop.org/show_bug.cgi?id=106489
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 14 May 2018 00:11:10 +0000 (10:11 +1000)]
evdev: drop the arbitrary trackpoint range maximum
ALPS SS5 devices have a range above 100.
https://bugs.freedesktop.org/show_bug.cgi?id=106323
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 11 May 2018 05:14:27 +0000 (15:14 +1000)]
doc: fix typo
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 11 May 2018 01:48:56 +0000 (11:48 +1000)]
doc: update pointer acceleration doc with the fixed graphs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 11 May 2018 01:17:05 +0000 (11:17 +1000)]
tools: fix an argument name for ptraccel-debug
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 10 May 2018 06:25:57 +0000 (16:25 +1000)]
tools: fix pointer acceleration graphs generation script
We're printing most of those those as mm/s now, improve to use gnuplot for
loops, and a few other fixes. The low-dpi graph is still out of whack (or the
implementation is?), need to fix that separately.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 10 May 2018 06:25:40 +0000 (16:25 +1000)]
gitignore: ignore gnuplot files
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 9 May 2018 04:29:52 +0000 (14:29 +1000)]
Fix the scan-build fake leaks
We pass the event to libinput_post_event() where it is appended to the event
queue. Except in these three cases clang doesn't seem to realize what's
happening and complains about memory leaks. I tried workarounds like
g_steal_pointer() but nothing I tried helps. So let's just pretend we're
freeing it when clang looks at us.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 10 May 2018 04:49:38 +0000 (14:49 +1000)]
tools: switch the ptraccel-debug tool to report profile curves by default
This is virtually the only one that matters at this point, the others may help
but they're usually more confusing than helpful.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Friedrich Schöller [Sat, 5 May 2018 01:49:32 +0000 (03:49 +0200)]
touchpad: fix tapping that happens after a moving thumb
When finger movement exceeded the motion threshold before the finger was
recognized as a thumb, it would never be regarded as a thumb by the tap system.
This prohibited tapping until the thumb was lifted.
This is fixed by moving the check for the thumb state up such that it
happens before the motion threshold check.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Paul Kocialkowski [Mon, 7 May 2018 18:46:39 +0000 (20:46 +0200)]
udev: Fix Chromebook R13 CB5-312T hwdb name
This fixes a typo in the Chromebook R13 CB5-312T hwdb name match and
extends it to the full model name, so that potential future other
Chromebook R13 devices (that are not CB5-312T) won't use these quirks.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 23 Mar 2018 01:00:46 +0000 (11:00 +1000)]
udev: copy the trackpoint sensitivity directly from sysfs
Rather than going the roundabout way of having systemd set the sensitivity
followed by us reading that udev property and hoping, just take the
sensitivity directly from sysfs. This makes us basically independent of what
systemd does (or the lack of systemd, where that is a problem).
It does remove the chance of users to trick libinput by manually adjusting the
sensitivity after the udev rules kicked in, but seriously, we should work on
fixing acceleration properly in that case.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 3 May 2018 09:14:14 +0000 (19:14 +1000)]
touchpad: only try to detect touchpad wobbling with one finger down
https://bugs.freedesktop.org/show_bug.cgi?id=106365
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 24 Apr 2018 05:57:04 +0000 (15:57 +1000)]
Revert "touchpad: only try to detect touchpad wobbling with one finger down"
Logic inversion error from a draft version of the patch, see corrected version
coming up.
This reverts commit
30a398591ba2d7b50767fb2f7d55b2caff491cd3.
Peter Hutterer [Thu, 3 May 2018 06:06:35 +0000 (16:06 +1000)]
doc: add two more items I need for trackpoint bugs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 3 May 2018 05:49:40 +0000 (15:49 +1000)]
doc: drop doc for POINTINGSTICK_CONST_ACCEL, no longer in use
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 3 May 2018 05:31:17 +0000 (15:31 +1000)]
util: remove dead assignment in strv_join
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 3 May 2018 05:16:33 +0000 (15:16 +1000)]
test: don't use ck_assert_ptr_null
Breaks the build on Ubuntu which ships check 0.10.0 from pre-Dec 2016.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 3 May 2018 03:51:00 +0000 (13:51 +1000)]
tools: libinput-record: print switch events in --with-libinput
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 2 May 2018 00:50:20 +0000 (10:50 +1000)]
tools: libinput-record: print tablet events in --with-libinput
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 2 May 2018 00:25:47 +0000 (10:25 +1000)]
util: add a strv_join() helper function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 3 May 2018 01:47:57 +0000 (11:47 +1000)]
Allow for TABLET_TOOL_BUTTON events in the various tablet_tool_get_<foo>()
We fill in the events correctly and we already allowed the
get_transformed_x/y functions on a button event, there isn't really a reason
to prohibit these.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 3 May 2018 02:18:22 +0000 (12:18 +1000)]
tools: libinput-record: move the event time offset to the first place we get it
Leftover from a previous version where printing and handling an event was
identical. Now we may handle events but not actually print them until a bit
later, so other events may have a (wrong) zero timestamp.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 2 May 2018 23:55:51 +0000 (09:55 +1000)]
evdev: mask out MSC_TIMESTAMP, we don't need it
Not really an issue at this point, but some HID devices like sending
MSC_TIMESTAMP. Since we don't use them in libinput, all we do is drag
ourselves out of sleep, look at the event, frown because it's not our morning
coffee, and go back to sleep. Instead, disable the code altogether, libevdev
will mask it transparently and then the kernel will let us sleep.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Deepa Dinamani [Tue, 16 Jan 2018 00:16:37 +0000 (16:16 -0800)]
Update struct input_event
The struct input_event is not y2038 safe.
Update the struct according to the kernel patch:
https://lkml.org/lkml/2018/1/6/324
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 24 Apr 2018 05:57:04 +0000 (15:57 +1000)]
touchpad: only try to detect touchpad wobbling with one finger down
Too many touches are unreliable with 2+ fingers down and we should error on
the side of not detecting wobbling.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 24 Apr 2018 05:35:46 +0000 (15:35 +1000)]
touchpad: reset the wobble detection for non-pointer events
If we get an event other than a motion event we're not wobbling so we need to
reset and restart.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 24 Apr 2018 00:34:21 +0000 (10:34 +1000)]
touchpad: reset the wobble detection history for y-only changes
Otherwise we may detect wobble despite having a series of valid y movements,
e.g. the following sequence was detected as wobble:
x: 1 y: 0
x: 0 y: 1
x: 0 y: 2
x: 0 y: 2
x: 0 y: 1
x: -1 y: 0
x: 1 y: 0
Avoid this by resetting the history when we get a dx == 0 event. It'll take
longer for real wobble to be detected but it reduces the number of false
positives.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 2 May 2018 03:51:00 +0000 (13:51 +1000)]
tools: print the number of touches for touch devices
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 2 May 2018 00:53:08 +0000 (10:53 +1000)]
Merge branch 'wip/custom-pointer-acceleration-function-v2'
Mike Hogye [Tue, 1 May 2018 15:14:41 +0000 (11:14 -0400)]
Fix spurious palm detections for Logitech Wireless Touchpad
This device frequently reports large pressure values during normal usage.
It does not require a tight palm threshold, because it is a desktop device
-- not built into a laptop surface -- so we can avoid false positives by
setting a very high threshold.
https://bugs.freedesktop.org/show_bug.cgi?id=105753
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 31 Jan 2018 06:04:09 +0000 (16:04 +1000)]
Add libinput_device_touch_get_touch_count()
This makes it possible for callers to detect whether a touch device is
single or multitouch (or even check for things like dual-touch vs real
multi-touch) and adjust the interface accordingly.
Note that this is for touch devices only, not touchpads that are just pointer
devices.
https://bugs.freedesktop.org/show_bug.cgi?id=104867
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 30 Apr 2018 00:40:45 +0000 (10:40 +1000)]
util: allow for palm pressure > 255
https://bugs.freedesktop.org/show_bug.cgi?id=105753
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 27 Apr 2018 04:40:57 +0000 (14:40 +1000)]
touchpad: fix the trackpoint event counter for the T460s
Introduced in
416fa44d80b0f2c53b652ddfa35dd4a156a65c65 but there was a logic
error: we claimed to require 3 events from a trackpoint before stopping the
touchpad but the timer was only set when we actually stopped the touchpad. So
if a trackpoint sends a single event every second, we'd disable the touchpad
after 3 seconds for the duration of the timeout, then again 3 seconds later,
etc.
Fix this by always setting the timeout and resetting the event counter if no
activity happened.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 11 Apr 2018 06:02:43 +0000 (16:02 +1000)]
touchpad: allow custom profiles on touchpads
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 14 Jun 2017 02:10:51 +0000 (12:10 +1000)]
Expose a custom acceleration profile
This adds a third profile to the available profiles to map device-specific
speed to an acceleration factor, fully defined by the caller.
There has been a consistent call for different acceleration profiles in
libinput, but very little specifics in what actually needs to be changed.
"faster horses" and whatnot (some notable exceptions in e.g. bug 101139).
Attempts to change the actual acceleration function will likely break things
for others.
This approach opens up the profile itself to a user-specific acceleration
curve. A caller can set an acceleration curve by defining a number of points
on that curve to map input speed to an output factor. That factor is applied
to the input delta.
libinput does relatively little besides mapping the deltas to the
device-specific speed, querying the curve for that speed and applying that
factor. The curve is device-specific, the input speed is in device units/ms.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 11 Apr 2018 07:51:44 +0000 (17:51 +1000)]
util: add a helper function to split a key-value pair string
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 24 Apr 2018 05:01:39 +0000 (15:01 +1000)]
filter: always average the velocity of the first two events
Don't apply any velocity diff checking on the first two events, always average
them (unless the timeout is hit or the direction changes). This averages out
some of the jumps we get on slow motion.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 24 Apr 2018 03:28:34 +0000 (13:28 +1000)]
tools: fix the script to make ptraccel graphs for meson's builddir
Partial fix only because we can't guess the build dir, but at least it doesn't
complain about the missing script now. And no-one really needs to run this
anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 26 Apr 2018 01:18:58 +0000 (11:18 +1000)]
gestures: if two fingers are in definitive pinch position, pinch
Two fingers on the touchpad, they're 40x40mm apart, that's a pinch. But only
after a timeout because we don't want to start a 2fg gesture if the user puts
down the third/fourth finger within the next few ms.
Related to: https://bugs.freedesktop.org/show_bug.cgi?id=99830
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 24 Apr 2018 04:28:01 +0000 (14:28 +1000)]
filter: make the MAX_VELOCITY_DIFF a double
The value is 0.001 which happens to be 0 when you cast it to int.
Introduced in
e3554f38f8016ad89ffb7d9569eaa48769d48255
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Ganzhorn [Tue, 24 Apr 2018 17:30:55 +0000 (19:30 +0200)]
fallback: Add IBM/Lenovo Scrollpoint mice quirk to enable smooth scrolling.
Instead of a scroll wheel these mice feature trackpoint-like sticks which
generate a huge amount of scroll events that need to be handled differently
than scroll wheel events.
Signed-off-by: Peter Ganzhorn <peter.ganzhorn@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 19 Apr 2018 03:19:04 +0000 (13:19 +1000)]
evdev: disable ABS_MT_TOOL_PALM on the Lenovo X1 Carbon 6th gen
This device randomly decides that a touch is now a palm, based on
the moon phase, the user's starsign and possibly what the dog had for
breakfast. Since libinput assumes that a touchpad that labels a touch as palm
has reasons to do so, let's unassume this for this device by disabling that
axis altogether and relying on the touch pressure only.
https://bugzilla.redhat.com/show_bug.cgi?id=
1565692
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 17 Apr 2018 08:02:14 +0000 (18:02 +1000)]
test: print the device name for a wrong event
So we can rule out any between device race conditions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 18 Apr 2018 01:35:48 +0000 (11:35 +1000)]
test: print the full event in case of a mismatch
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 14 Mar 2018 23:09:28 +0000 (09:09 +1000)]
touchpad: ignore any semi-mt movement in the same frame as a finger release
Semi-MT devices provide a bounding box of the fingers, and internally we don't
treat them as real MT device. Depending which finger currently provides
ABS_X/Y we may get a large jump when the other finger is released.
Basic sequence is finger 1 down, finger 2 down, finger 1 up.
On the last interaction, the ABS_X/Y which was on finger 1's coordinates now
jumps to finger 2's coordinates. This is interpreted as movement by the
tapping code, resulting in missed two-finger taps.
Ignore these movements on semi-mt devices.
https://bugs.freedesktop.org/show_bug.cgi?id=105043
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 19 Dec 2017 04:54:53 +0000 (14:54 +1000)]
touchpad: ignore palm touches when handling clickfingers
https://bugs.freedesktop.org/show_bug.cgi?id=104188
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 19 Apr 2018 06:01:42 +0000 (16:01 +1000)]
tools: yaml verifier: fix some flake8 warnings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 19 Apr 2018 04:29:07 +0000 (14:29 +1000)]
tools: libinput-replay: handle a nonzero offset for the first event
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 19 Apr 2018 03:48:25 +0000 (13:48 +1000)]
tools: libinput-record: add gesture support
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 19 Apr 2018 04:04:09 +0000 (14:04 +1000)]
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>
Peter Hutterer [Thu, 19 Apr 2018 03:46:12 +0000 (13:46 +1000)]
tools: yaml verifier: add POINTER_AXIS to allowed events types
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Daniel van Vugt [Tue, 17 Apr 2018 02:43:32 +0000 (10:43 +0800)]
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>
Peter Hutterer [Wed, 11 Apr 2018 02:06:06 +0000 (12:06 +1000)]
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>
Peter Hutterer [Wed, 11 Apr 2018 01:49:15 +0000 (11:49 +1000)]
filter: namespace the various trackers_* functions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 11 Apr 2018 01:41:16 +0000 (11:41 +1000)]
filter: split the mouse acceleration out into a separate file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 11 Apr 2018 01:24:48 +0000 (11:24 +1000)]
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>
Peter Hutterer [Wed, 11 Apr 2018 01:14:56 +0000 (11:14 +1000)]
filter: tidy up the touchpad filter
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 11 Apr 2018 01:05:12 +0000 (11:05 +1000)]
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>
Peter Hutterer [Wed, 11 Apr 2018 00:57:50 +0000 (10:57 +1000)]
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>
Peter Hutterer [Wed, 11 Apr 2018 00:54:48 +0000 (10:54 +1000)]
filter: move the velocity diff to the only function we use it in
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 10 Apr 2018 04:21:26 +0000 (14:21 +1000)]
filter: split the touchpad acceleration code into a separate file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 10 Apr 2018 06:20:45 +0000 (16:20 +1000)]
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>
Peter Hutterer [Tue, 10 Apr 2018 04:49:56 +0000 (14:49 +1000)]
filter: move the pointer_accelerator struct into the header
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 10 Apr 2018 04:09:31 +0000 (14:09 +1000)]
filter: split trackpoint acceleration code into a separate file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 10 Apr 2018 04:01:58 +0000 (14:01 +1000)]
filter: split the tablet accel code into a separate file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 10 Apr 2018 03:08:09 +0000 (13:08 +1000)]
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>
Peter Hutterer [Tue, 10 Apr 2018 06:26:46 +0000 (16:26 +1000)]
filter: add helper function to reset and free trackers
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 10 Apr 2018 05:12:58 +0000 (15:12 +1000)]
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>
Peter Hutterer [Tue, 10 Apr 2018 03:25:53 +0000 (13:25 +1000)]
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>
Peter Hutterer [Tue, 10 Apr 2018 02:56:22 +0000 (12:56 +1000)]
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>
Peter Hutterer [Tue, 28 Nov 2017 04:30:26 +0000 (14:30 +1000)]
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>
Peter Hutterer [Tue, 10 Apr 2018 03:07:19 +0000 (13:07 +1000)]
meson: re-use the filter source list
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 19 Mar 2018 05:39:22 +0000 (15:39 +1000)]
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>
Peter Hutterer [Wed, 18 Apr 2018 01:05:46 +0000 (11:05 +1000)]
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>
Peter Hutterer [Wed, 18 Apr 2018 00:52:32 +0000 (10:52 +1000)]
test: replace a strcmp with streq
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 17 Apr 2018 07:18:01 +0000 (17:18 +1000)]
test: remove double check for empty queue
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Davide Depau [Tue, 17 Apr 2018 13:22:42 +0000 (15:22 +0200)]
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>
Sean Lanigan [Sun, 15 Apr 2018 02:17:00 +0000 (12:17 +1000)]
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>
Peter Hutterer [Tue, 17 Apr 2018 00:06:22 +0000 (10:06 +1000)]
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
69fe467fbacbc8376d548c335c79cca71b606b07.
https://bugs.freedesktop.org/show_bug.cgi?id=104990
Peter Hutterer [Fri, 13 Apr 2018 04:00:05 +0000 (14:00 +1000)]
test: add a test for a touchscreen with out-of-range axes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 16 Apr 2018 01:25:15 +0000 (11:25 +1000)]
doc: add a description of the internal architecture
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 15 Apr 2018 22:37:06 +0000 (08:37 +1000)]
Remove some duplicate empty lines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 13 Apr 2018 04:45:19 +0000 (14:45 +1000)]
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>
Peter Hutterer [Fri, 13 Apr 2018 04:39:58 +0000 (14:39 +1000)]
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>
Sean Lanigan [Thu, 12 Apr 2018 11:17:00 +0000 (21:17 +1000)]
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>
Peter Hutterer [Fri, 13 Apr 2018 00:44:34 +0000 (10:44 +1000)]
doc: add a section on what happens when a bug was resolved
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 12 Apr 2018 23:05:02 +0000 (09:05 +1000)]
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>
Peter Hutterer [Thu, 12 Apr 2018 23:07:38 +0000 (09:07 +1000)]
evdev: remove duplicate MODEL entry in the model parsing
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 12 Apr 2018 22:57:05 +0000 (08:57 +1000)]
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>
Peter Hutterer [Thu, 12 Apr 2018 04:17:50 +0000 (14:17 +1000)]
doc: expand the "reporting bugs" page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 12 Apr 2018 01:56:43 +0000 (11:56 +1000)]
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>
Peter Hutterer [Thu, 12 Apr 2018 00:56:32 +0000 (10:56 +1000)]
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>
Peter Hutterer [Thu, 12 Apr 2018 01:10:26 +0000 (11:10 +1000)]
evdev: break up a long line
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tim Richardson [Wed, 11 Apr 2018 09:34:59 +0000 (19:34 +1000)]
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>
Peter Hutterer [Mon, 9 Apr 2018 22:53:12 +0000 (08:53 +1000)]
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
ab55302ef88c3827ecc32f3dd3dc58ca7ebfb7a9.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>