mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-21 16:50:42 +01:00
tablet: fix handling of AttrPressureRange quirk
tablet_get_quirked_pressure_thresholds() is wrong: the pressure thresholds for tip press and tip release are swapped around. This seems to be a regression introduced in commit4bc27543e9. This prevents AttrPressureRange from working as intended for tablets, and causes weird things to happen if it's set. (For example, when pressure is in the range between the intended release threshold and the intended press threshold, the "pressed" status flip-flops between 0 and 1 every frame). Fix that. (cherry picked from commitb58d5a165b) Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1434>
This commit is contained in:
parent
421fe9457e
commit
edc25c071a
1 changed files with 2 additions and 2 deletions
|
|
@ -1142,8 +1142,8 @@ tablet_get_quirked_pressure_thresholds(struct tablet_dispatch *tablet, int *hi,
|
|||
_unref_(quirks) *q = libinput_device_get_quirks(&device->base);
|
||||
if (q && quirks_get_range(q, QUIRK_ATTR_PRESSURE_RANGE, &r)) {
|
||||
if (r.lower < r.upper) {
|
||||
*hi = r.lower;
|
||||
*lo = r.upper;
|
||||
*lo = r.lower;
|
||||
*hi = r.upper;
|
||||
status = true;
|
||||
} else {
|
||||
evdev_log_info(device,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue