mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-12 02:10:20 +01:00
test: add an extra override hook for tablet motion
Currently unused but it complements the existing override handlers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
160b062454
commit
44de3ff367
2 changed files with 9 additions and 0 deletions
|
|
@ -125,6 +125,9 @@ struct litest_device_interface {
|
|||
bool (*tablet_tip_up)(struct litest_device *d,
|
||||
double *x, double *y,
|
||||
struct axis_replacement *axes);
|
||||
bool (*tablet_motion)(struct litest_device *d,
|
||||
double *x, double *y,
|
||||
struct axis_replacement *axes);
|
||||
|
||||
/**
|
||||
* Pad events, LITEST_AUTO_ASSIGN is allowed on event values
|
||||
|
|
|
|||
|
|
@ -2536,6 +2536,12 @@ litest_tablet_motion(struct litest_device *d,
|
|||
{
|
||||
struct input_event *ev;
|
||||
|
||||
/* If the test device overrides proximity_out and says it didn't
|
||||
* handle the event, let's continue normally */
|
||||
if (d->interface->tablet_motion &&
|
||||
d->interface->tablet_motion(d, &x, &y, axes))
|
||||
return;
|
||||
|
||||
ev = d->interface->tablet_motion_events;
|
||||
while (ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1) {
|
||||
int value = auto_assign_tablet_value(d, ev, x, y, axes);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue