mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-30 07:10:08 +01:00
eis: don't EINVAL if a coordinate is outside the region
From the documentation: "The x/y coordinate must be within the device's regions or the event is silently discarded." libei discards it but if it somehow makes it through anyway, let's discard it again.
This commit is contained in:
parent
e93ad6925c
commit
1748ddaf3d
1 changed files with 2 additions and 4 deletions
|
|
@ -740,10 +740,8 @@ eis_device_event_pointer_abs(struct eis_device *device,
|
|||
if (device->state != EIS_DEVICE_STATE_EMULATING)
|
||||
return -EINVAL;
|
||||
|
||||
if (!eis_device_in_region(device, x, y))
|
||||
return -EINVAL;
|
||||
|
||||
eis_queue_pointer_abs_event(device, x, y);
|
||||
if (eis_device_in_region(device, x, y))
|
||||
eis_queue_pointer_abs_event(device, x, y);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue