The external Apple "Magic" trackpads, both the first and the second
generations, have pretty good built-in spurious touch filtering. For
these device models libinput's own filtering is not required. Using low
enough values such as 20:10 effectively disables libinput's filtering.
Signed-off-by: Yariv Barkan <oigevald+libinput@gmail.com>
If we have a recording that started after the touch down, let's start that
touch on the first x/y position update.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
d107d5 broke this tool because the InputEvent was our local datastructure,
which needed the evbit redirect.
Fixes d107d58cd2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
If we know that the tablet mode switch is bogus anyway, filter the event and
don't pass it to the caller. They won't know whether it's bogus so the only
result we get here is buggy behaviour.
This is the simplest solution here, it filters the mode switch at the lowest
level and thus the caller won't know that the tablet even has a mode switch at
all. Where the device doesn't have any other switches it'll also lose the
switch capability.
This may cause issues in some niche cases where the event node only has
that one bit and we now disabled it leaving us with a zero-event bit device.
Shouldn't matter to callers, but let's see.
Fixes#491
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The has_switch() function returns -1 if the device doesn't have the switch
capability - which is the same as "true" and how we used this so far. Fix the
checks.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Where a touch is labelled as palm on TOUCH_BEGIN (edge palms) we would still
feed the touch through the tap state machine. This would trigger the PALM
transition for each state, usually reducing the touch count.
When the touches were later released, the touch count was out of sync,
resulting in an error message. In the case of #488, the trigger was
a single evdev frame with three fingers down, the third of which was an edge
palm:
- touch 1 transitions from IDLE to TOUCH
- touch 2 transitions from TOUCH to TOUCH_2
- touch 3 (the palm) transitioned from TOUCH_2 back to TOUCH
That third transition is invalid, the palm hasn't been seen by the tap state
machine so it should just be ignored.
Fix this by moving making the tap state processing conditional on a touch
state other than TOUCH_BEGIN.
Fixes#488
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This is merely the simple support that we use in the fallback backend as
well. It doesn't interact with touch arbitration directly but it'll be
good enough for the default use-case.
Fixes#476
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The HP stream x360 11's embedded-controller filters out events form its
builtin keyboard when in tablet-mode itself; and it has a capacitive
home-button (windows logo) underneath its display which also sends
PS/2 key-events.
Suspending the keyboard while in tablet-mode also disable the capacitive
home button, which is undesirable.
Add a ModelTabletModeNoSuspend quirk so that the home button keeps working
when in tablet-mode. This can safely be done since the rest of the
keyboard gets disabled by the embedded-controller for us.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This somewhat duplicates the existing test
huion_static_btn_tool_pen_disable_quirk_on_prox_out
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
With the previous patches a tablet would ignore a valid proximity out sequence
where it happends after a forced prox-out. Fix this by checking the state when
we're in forced proximity out - if we have a zero tool state but a tool
updated then we did get a proximity out.
And fix the existing test to check for that case.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This quirk was introduced for #248 was caused by buggy input-wacom drivers,
not by actual firmware, see
https://gitlab.freedesktop.org/libinput/libinput/issues/381#note_279371
This appears to be the only tablet where this fix was needed, but we've been
playing whack-a-mole ever since to work around the various other tablets that
break with this behavior in place.
So let's revert that fix and hope there aren't any other tablets out there
(and if they are, we can probably quirk those). The revert makes the ISDV4 pen
quirk obsolete (see 9cb089f2b6), so this was
folded into this commit.
This reverts commit 4f63345b60.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
!292 improved libinput's ability to detect multiple-finger clicks when
the fingers were not aligned close to horizontally. However that caused
thumb detection to fail in several use cases.
This patch restores thumb detection for
- 2+ finger physical clickpad presses
- resting thumb while two-finger scrolling
- touches in the thumb exclusion area during multi-finger taps
and improves pinch detection when thumb is centered below fingers.
It also further enhances the flexibility of finger position for 2-, 3-,
or 4-finger taps: if all tapping fingers land on the touchpad within a
short time (currently 100ms), they will all count regardless of
position (unless below the lower_thumb_line).
Signed-off-by: Matt Mayfield <mdmayfield@yahoo.com>
This has never been supported through the stack. No device ever had the
required MOUSE_WHEEL_TILT_VERTICAL/HORIZONTAL udev property set, so
libinput never set the right axis source. Neither weston nor mutter
added the code for it. Even if we added wheel tilt for devices now, it
would break those devices. And the benefit we get from having those
separate is miniscule at best.
So let's do the long-term thing and just deprecate this axis source.
The wheel tilt mouse test device remains in the test suite, with the
udev properties set just to verify that we do indeed ignore those now.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Take a snapshot of the time every 10 libinput_dispatch() calls. During event
processing, check if the event timestamp is more than 10ms in the past and
warn if it is. This should provide a warning to users when the compositor is
too slow to processes events but events aren't coming in fast enough to
trigger SYN_DROPPED.
Because we check the device event time against the dispatch time we may get
warnings for multiple devices on delayed processing. This is intended, it's
good to know which devices were affected.
In the test suite we need to ignore the warning though, since we compose the
events in very specific ways it's common to exceed that threshold
(particularly when calling litest_touch_move_to).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This was changed in 5e25bdfb03 but the litest
message lookup wasn't changed. Let's do that now and change to a generic
wording we can re-use for other messages.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The previous text wasn't accurate enough, USB used to be considered
external but we've since started deferring to the hwdb for those (except
Apple).
Fixes#483
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This patch allows the bezel buttons,
to work when entering SW_TABLET_MODE
similar to how other x2xx tablets are
working.
Signed-off-by: Troels Blicher Petersen <troels@newtec.dk>
Where libinput is installed, checking whether the fuzz is applied to the
device will always fail with an error - the udev rules will remove the
fuzz and copy its value to the LIBINPUT_FUZZ properties instead.
So let's fix this: where the fuzz shows up on the device print a warning
because libinput's udev rule isn't working. And where it's missing check
the udev properties and compare those to the settings instead.
Fixes#472
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
For backwards compatibility reasons, the hwdb.bin created udevadm hwdb
does not actually apply matches in the way you'd expect. systemd-hwdb
creates the newer format and is preferred.
Related: #472
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
For some reason I'm too tired to investigate, the whitespace in the CI is
different than the locally generated one. Alpine must've updated something, I
guess. Quickfix it by adjusting the whitespace so it's correct again.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The threshold colors events above a certain value in red, ignore-below skips
any line below that threshold.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
New output example:
9.408899 +5ms DBL: ↑↗ 1/ -9 | →→ 0/ 0 |
where DBL stands for BTN_DOUBLE.
This also widens the relative time by one so we don't lose formatting for >1s
delta time.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Makes the output easier to understand given that most touchpads have 5+ slots
but don't actually use them (or the users don't).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
When a boolean quirk is set to "0", it is correctly disabled, but "libinput quirks list" and
"libinput record" showed it as "1".
This happens for example if ModelXXXX=0 is set in /etc/libinput/local-overrides.quirks, to
override a default quirk.
Signed-off-by: Loïc Yhuel <loic.yhuel@softathome.com>
This has been there for years and I never used it. Much better to convert it
to a generically useful one (i.e. one that prints red so it's easy to see) and
make it unconditional.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The Aiptek 8000U has a pressure offset above our default (%5) but no
meaningful way of detecting that. It doesn't provide distance or BTN_TOOL_PEN
either, so our heuristics can't hook onto anything. BTN_TOUCH is set by this
tablet but not at consistent pressure thresholds.
Work around this by shipping a quirk that ups it to 70. Aiptek
re-uses USB IDs because of course they do, so this applies to more than one
device. Let's see what breaks.
Fixes#462
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Replacement for the touchpad-edge-detector tool with a slightly more
expressive design, hopefully cutting down on some of the bug reports.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
There is a race between adding the udev monitor and enumerating current
devices. Any device added in that window will show up in both lists, causing
it to be added twice.
Fix this by comparing the syspath of any added device to the existin ones in
the seat - where it matches we can ignore the device.
Fixes#459
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>