If the tool has a name let's provide that to the caller. We have it
easily accessible so let's export it to make everyone's life easier. The
name is provided by libwacom, there is no need for us
to even copy that value since we don't need it ourselves.
Note that at this point effectively only (some) Wacom devices have
meaningful names. Virtually all non-wacom devices will use a generic
tool and even the built-in Wacoms will largely just say "AES Pen".
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1399>
The WHEEL_STATE_NONE check was effectively always false:
- if we didn't receive any event yet, wheel_maybe_disable() wasn't
called in any code path
- if we did receive a scroll event, the wheel state was either
WHEEL_STATE_SCROLLING or WHEEL_STATE_ACCUMULATING_SCROLL
Fix this two-pronged: remove the check for WHEEL_STATE_NONE but also
immediately call disable when we disable the feature. We don't carry
enough state in this plugin to really worry about the device being in
a fully neutral state (and realistically the vast majority of use-cases
will likely disable wheel debouncing on new device anyway).
Closes#1241
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1408>
Actually not needed using internal approach.
Keyboard is ps2 wired in pogo pins and touchpad is usb, both internal by
default so dwt is in effect.
If tablet side buttons are also within ps2, they are not going to be
disabled as chassis is detachable.
Tablet mode switch untouched as is unclear if actual kernels play nice
with it.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1406>
Actually all usb touchpads are internal by default, reflect this in the
acer touchpad definition.
This causes that not only the acer keyboard in its group activates DWT
but all the intenal keyboards.
Remove asserting that other keyboards doesn't affect DWT as that is the
intended behaviour.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1400>
Ifdef out any special behavior we want so we no longer leak this via
strings in the resulting binary. Ideally we want the compile to fail for
anything missed rather than surprising behavior when we try to access
files in the build directory.
Closes: #1230
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1396>
These are quirks needed for Lenovo detachable devices by setting the
keyboard as internal to enable DWT and act as if it's a laptop.
Here we try to cover all the ideapad ones.
Also remove a quirk in Chicony that sets the touchpad below to enable
DWT, prefer to set the keyboard as internal as touchpad position is
intended for external ones like the input device we also move to the
bottom in Lenovo to have all pure input device quirks in one place.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1389>
This tests for a known bug in the implementation rather than the ideal case
how it should work.
The config is applied to the tool and on prox out to the current tablet
but then the tool goes in prox on a new tablet and the configuration
doesn't get applied there. In the test we work around this by injecting
an extra proximity event to get the range applied.
This needs some rework in the evdev-tablet code but it's questionable
whether it makes a difference given the small number of users with
multiple tablets and pressure ranges set.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1397>
Previously test devices had to set LITEST_AUTO_ASSIGN to be able
to override an axis-specific value. But this prevented us from
easily overriding other axis values (e.g. tablet tool ids) that usually
have the same value.
LITEST_AUTO_ASSIGN should indicate a value that must always be
auto-assigned, that makes a lot more sense.
This does mean we need to handle ABS_MT_TRACKING_ID -1 to avoid that
getting overwritten by auto_assign_tablet_value() but oh well.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1398>
This only worked because any all our test devices declare a fixed 0
value for x/y in the proximity out event frame. Since 0 !=
LITEST_AUTO_ASSIGN we never got to the litest_scale() for x/y which
would abort because of the -1 value.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1398>
Cover Acer detachable keyboards used in Switch tablet devices to set
them internal and allow DWT.
Move one of them from chicony using the below method.
While at it change the match for internal keyboard in Acer Spin 5 to
rely of bus and type and add ':' before svn dmi match.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1392>
Don't disable inputs for detachable and tablet devices, they are
physically unplugged from their input devices but tend to have buttons
as internal keyboard in the tablet part that must work always. We know
what kind of device is using the Chassis Type DMI value.
Also remove specific device quirks now covered by the chassis type.
Finally refactor some Lenovo devices using this quirk and redefine Dell
2-in-1 with this quirk using chassis type.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1390>
Matching in vendor and product covers many models as possible.
01E8 product is always haptic.
01E0 can be or not haptic, leave it outside this and mantain it per
system model. When the kernel detects haptic touchpads the ones that
cannot be differenciated won't need to have quirk neither.
Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1383>
This quirk is a generic one for all the HP laptops with haptic touchpad
so makes more sense here because we are applying it dmi independent
being more difficult to track this change if the touchpad became used in
other vendors.
Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1378>
A few devices have a keyboard/keypad which can be slid under the device,
leaving the device with only touch-based interaction. The corresponding kernel
event is reported as SW_KEYPAD_SLIDE [0]. Implement support in libinput.
Since the position of the switch varies across devices, it cannot always be
certain whether the keypad is usable when the switch is in the set position.
Therefore, do not automatically disable the keyboard.
[0] e68d80b13b/include/linux/linux/input-event-codes.h (L885)Closes: #1069
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1242>