This are tests with drag lock enabled, so our timeout needs to be
be the tap and drag timeout (which is higher than the normal tap timeout).
Only worked because they're similar enough that if there's a bit of a
delay, the extra ms push us over the line.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/984>
In touchpad_2fg_scroll_return_to_motion we sometimes fail because the
timeout is too close to the actual timeout expiry, creating a race
condition on whether the scroll stop event (triggered by the gesture
end) is sent before or after the timeout expiry.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/984>
We're writing a lot of events here, if the system isn't fast enough or
(in the future) if we have a custom socket instead of a kernel device we
might fill up the write buffer, causing the test to fail.
Easy workaround is to dispatch more often to ensure the data is being
read from the fd.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/984>
On a touchpad without gestures we would take a 2-finger touch as
immediate start to a 2-finger scroll gesture. This effectively removes
the 1mm threshold we otherwise have before scrolling is assumed to have
started.
If tapping is enabled and a user triggers a small motion event this
results in scroll events being sent before the two-finger tap.
Closes#981
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/982>
The Dell Precision 5480 has a large touchpad without any visible markers
for the touchpad buttons.
Since the ModelTouchpadVisibleMarker quirk is enabled by default for all
Dell touchpads, the middle button area ends up being too small. Disable
the quirk for this specific model.
Closes: #976
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/979>
Some tablets such as those in the XP-PEN PRO series use "dials" which
are actually scrollwheels and emit EV_REL events. These should not be
emulated as rings (which are absolute) so we must expose them as a new
tablet event.
Adds LIBINPUT_EVENT_TABLET_PAD_DIAL that work largely identical as our
high-resolution wheel events (i.e. the values are in multiples or
fractions of of 120). Currently supports two dials.
This is a lot of copy/paste from the ring axes because the interface is
virtually identical. The main difference is that dials give us a v120
value in the same manner as our scroll axes.
Notes:
- REL_DIAL is mutually exclusive with REL_WHEEL, we assume the kernel
doesn't (at this point) give us devices with both. If this changes for
devices with three dials (wheel + hwheel + dial) we need to add code
for that.
- REL_DIAL does not have a high-resolution axis and we assume that any
device with REL_WHEEL_HI_RES will also have REL_HWHEEL_HI_RES (if the
second wheel exists).
- With dials being REL_DIAL or REL_WHEEL there is no possibility of
detecting a finger release (the kernel does not route EV_RELs with a
value of zero). Unless this is implemented via a side-channel - and it
doesn't look like any hardware that supports dials does that - we
cannot forward any information here. So unlike absolute rings we
cannot provide a source information here.
Closes#600
Co-authored-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/967>
BTN_0 is the only one guaranteed to exist (otherwise we skip the test)
so let's ensure we have at least one event - all the others will fail if
we don't get the right event sent.
This enables the test to run against devices that only have one button.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/967>
Other systems use the same touchpad but without physical buttons (e.g.
SpeedMind M-BOOK) and obviously the various systems using the 5288
touchpad, see commit d1f274c7.
Let's tighten this quirk to just the Graviton only.
Closes#970
Fixes 8163b552be23ef3f4082775649bb12a3f6162df6
Related !957
Add a configuration option to reduce the available hardware range to a
fraction thereof. This is done by copying the absinfo struct for the
pressure value and adjusting that copy's minimum/maximum value for
scaling into the target normalized range.
The 1%/5% tip thresholds are kept but pressure offset detection is
disabled if there is a custom pressure range.
Unlike the pressure curve which is implemented in the compositor, the
pressure min/max range needs to be in libinput, primarily because the
tip threshold needs to adjust to any new minimum, allowing for
light touches with a pen without triggering tip down even at a higher
hardware pressure.
The tablet tilt range may be set as [-N, M] in which case we assume that
a value of zero is vertical (and thus should result in a libinput tilt
value of zero). Unfortunately some tablets report an even total value
range, e.g. [-64, 63] so zero is not actually the mathematical center of
the axis.
Fix this by bumping the axis maximum so zero becomes the logical center.
All devices we've seen so far have [-A, (A-1)] as range so bumping it by
one makes it symmetric.
Like the input axis, a normalized range has min/max inclusive so we
cannot use the absinfo_range() helper which assumes the max is exclusive.
Reverts parts of 4effe6b1b9
Fixing the range is only required when the output range is not inclusive
of the min/max (such as when mapping an abs axis to a screen width).
Our pressure range is inclusive 0.0 and 1.0, so we want absinfo->maximum
to map to exactly 1.0
This reverts commit a5b6f4009b.
And add a test to make sure the tool we know that has three buttons (Pro
Pen 3) can send all those. Enough to run that test one one compatible
device, no real benefit of running it on all tablet devices.
If a test goes past the tip-down threshold, the proximity timeout does
not trigger. And one can spend a long time trying to debug why the test
fails...
As far as I vaguely remember, these devices' pressure values are correct
enough, it's just the lack of BTN_TOOL_PEN that is the issue so instead
of a proper proximity out, we just send enough data to set the pressure
to below the tip threshold.
If libwacom is disabled or there is no .tablet file in libwacom for this
device yet, default to enabling a left-handed setting. Otherwise the
tablet may not be usable.
See https://github.com/linuxwacom/libwacom/issues/616
The generic quirk introduced in commit d1f274c7 ("quirks: add a
more generic match for the 5288 Synaptics clickpad") affects the
touchpad (with physical buttons) present in the Graviton N15i-K2.
This way users who don't know gitlab much but are most likely reporting
a bug get to use this template and anyone else can remove the
boilerplate and be more free-form and/or prosaic.