mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-20 04:30:07 +01:00
eis: allow pausing the device when it is emulating
The whole point of pausing a device is to terminate the client's ability to send events. Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/367>
This commit is contained in:
parent
fe47a0a1f7
commit
73ec8dee9f
1 changed files with 7 additions and 2 deletions
|
|
@ -1437,8 +1437,13 @@ eis_device_pause(struct eis_device *device)
|
|||
{
|
||||
struct eis_client *client = eis_device_get_client(device);
|
||||
|
||||
if (device->state != EIS_DEVICE_STATE_RESUMED)
|
||||
return;
|
||||
switch (device->state) {
|
||||
case EIS_DEVICE_STATE_RESUMED:
|
||||
case EIS_DEVICE_STATE_EMULATING:
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
device->state = EIS_DEVICE_STATE_PAUSED;
|
||||
eis_device_event_paused(device, eis_client_get_next_serial(client));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue