These devices had the debouncing disabled via a model quirk but
really they are virtual devices and should have all hw-specific
processing disabled - on the assumption that this will be handled
in the host. See also e.g. commit 5d23794d53 ("tablet: disable
smoothing for uinput devices").
Closes#1175
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1308>
HP OmniBook Ultra Flip Laptop 14-fh0xxx manages itself keyboard and
touchpad deactivation when HP's custom Intel ISH firmware is installed
in the system. Without the custom firmware tablet-mode switch isn't
exposed so there is no way we don't need this.
More detailed information in the file comment.
Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1311>
A device may send axis events while the tool is out of proximity,
causing our plugin to force a proximity in for the pen. If the tool then
sends a proximity event for a different tool we ended up with two tools
in proximity.
The sequence in #1171 shows this:
- evdev:
- [ 1, 499608, 3, 27, 0] # EV_ABS / ABS_TILT_Y 0 (+30)
- [ 1, 499608, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +0ms
- evdev:
- [ 2, 199637, 1, 321, 1] # EV_KEY / BTN_TOOL_RUBBER 1
- [ 2, 199637, 4, 4, 30] # EV_MSC / MSC_SCAN 30 (obfuscated)
- [ 2, 199637, 1, 330, 1] # EV_KEY / BTN_TOUCH 1
- [ 2, 199637, 3, 0, 910] # EV_ABS / ABS_X 910 (+246)
- [ 2, 199637, 3, 1, 8736] # EV_ABS / ABS_Y 8736 (-105)
- [ 2, 199637, 3, 27, -25] # EV_ABS / ABS_TILT_Y -25 (-25)
- [ 2, 199637, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +700ms
Fix this by remembering that we forced the tool out of proximity so if
we see tool events for another tool we force the pen out of proximity
again.
This will have some interplay with the other tablet plugins but
hopefully none that affect real-world devices, e.g. forcing a proximity
out means the proximity out timer plugin gets disabled. Since devices
behave in unexpected manners anyway let's see if it affects a real-world
device.
Closes#1171
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1306>
When printing tablet events always print a '*' or ' ' suffix to ensure
the alignment of the next field matches. We're using a tab to align
after each field so if the string length doesn't match, our events may
print at different tab stops.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1299>
For some reason clang-tidy believes that in the second iteration group
is set to NULL and causes a NULL-pointer dereference.
../src/evdev-tablet-pad.c:305:2: error: Access to field 'next' results in a dereference of a null pointer [clang-analyzer-core.NullDereference,-warnings-as-errors]
305 | list_for_each(group, &pad->modes.mode_group_list, link) {
| ^
../src/util-list.h:265:13: note: expanded from macro 'list_for_each'
265 | pos = list_first_entry_by_type(&pos->member, __typeof__(*pos), member))
| ^
../src/util-list.h:202:2: note: expanded from macro 'list_first_entry_by_type'
202 | container_of((head)->next, container_type, member)
| ^
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1298>
Because our lua hooks don't expose the device-added callback we need to
cache any calls to disable a feature and then apply it quietly when the
device is actually added. Any other call can go straight through.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1249>
Also a long-requested configuration option but it's difficult to expose
- depending on the touchpad we utilize different palm detection methods
and in theory may add to those at any time as we see fit.
Disabling it completely via a configuration option is only going to get
us more bug reports because *some* palm detection is likely desired on
most setups. So let's allow disabling it in a plugin and thus leave any
further palm detection code up to the plugin.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1249>
Over the years we had a few devices that required some special
hysteresis handling - all of it very customized to the device and not
upstreamable (or even implementable by upstream without the device).
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1249>
Both about the same complaint, somehow it is of the impression that
masks->mask can be an uninitialized value. The only place where we
allocate those is in _infmask_ensure_size() and they're set to zero
there.
libinput/src/util-bits.h:166:22: warning: The left operand of '&' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
166 | return !!(mask.mask & bit(bit));
| ^
libinput/src/util-bits.h:444:2: note: Calling 'infmask_set_bit'
444 | infmask_set_bit(&m, mask);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
libinput/src/util-bits.h:394:15: note: Calling 'infmask_bit_is_set'
394 | bool isset = infmask_bit_is_set(mask, bit);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libinput/src/util-bits.h:382:13: note: Field 'mask' is non-null
382 | if (!mask->mask || bit / bitmask_size() >= mask->nmasks)
| ^
libinput/src/util-bits.h:382:6: note: Left side of '||' is false
382 | if (!mask->mask || bit / bitmask_size() >= mask->nmasks)
| ^
libinput/src/util-bits.h:382:2: note: Taking false branch
382 | if (!mask->mask || bit / bitmask_size() >= mask->nmasks)
| ^
libinput/src/util-bits.h:385:9: note: Uninitialized value stored to 'mask.mask'
385 | return bitmask_bit_is_set(mask->mask[bit / bitmask_size()], // NOLINT(core.UndefinedBinaryOperatorResult)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
386 | bit % bitmask_size());
| ~~~~~~~~~~~~~~~~~~~~~
libinput/src/util-bits.h:385:9: note: Calling 'bitmask_bit_is_set'
385 | return bitmask_bit_is_set(mask->mask[bit / bitmask_size()], // NOLINT(core.UndefinedBinaryOperatorResult)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
386 | bit % bitmask_size());
| ~~~~~~~~~~~~~~~~~~~~~
libinput/src/util-bits.h:166:22: note: The left operand of '&' is a garbage value
166 | return !!(mask.mask & bit(bit));
| ~~~~~~~~~ ^
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1292>
../src/evdev-mt-touchpad-buttons.c:1233:16: warning: Value stored to 'button' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
1233 | evdev_usage_t button = evdev_usage_from_uint32_t(0);
| ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1292>
Instead of a hard assert if we fail to find the mode group for the given
ring/dial/strip let's just log an error and discard the event.
I'm not sure this assert can be triggered in the current code base but
if it can an error message is going to be more useful to the user than
an assert.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1291>
This looks like a copy-and-paste error. In practice it was harmless on
64-bit systems because evdev_event happens to be 64 bits long, but on
32-bit systems it would allocate too little memory.
Found by GCC 15 with _FORTIFY_SOURCE=3 on ia32.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1288>