mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-05 07:38:10 +02:00
libinput: litest shall only emit auto assign events when replaced
With this change auto assign events will be skipped if no replacement value is provided. This behavior is practical when emitting mt events, as those only contain the axis values that changed. Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
8215d725d0
commit
58f25a47ed
1 changed files with 4 additions and 4 deletions
|
|
@ -1294,7 +1294,6 @@ litest_auto_assign_value(struct litest_device *d,
|
|||
value = touching ? 0 : 1;
|
||||
break;
|
||||
default:
|
||||
value = -1;
|
||||
if (!axis_replacement_value(axes, ev->code, &value) &&
|
||||
d->interface->get_axis_default)
|
||||
d->interface->get_axis_default(d, ev->code, &value);
|
||||
|
|
@ -1344,8 +1343,8 @@ litest_slot_start(struct litest_device *d,
|
|||
y,
|
||||
axes,
|
||||
touching);
|
||||
|
||||
litest_event(d, ev->type, ev->code, value);
|
||||
if (value != LITEST_AUTO_ASSIGN)
|
||||
litest_event(d, ev->type, ev->code, value);
|
||||
ev++;
|
||||
}
|
||||
}
|
||||
|
|
@ -1430,7 +1429,8 @@ litest_slot_move(struct litest_device *d,
|
|||
y,
|
||||
axes,
|
||||
touching);
|
||||
litest_event(d, ev->type, ev->code, value);
|
||||
if (value != LITEST_AUTO_ASSIGN)
|
||||
litest_event(d, ev->type, ev->code, value);
|
||||
ev++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue