mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-25 02:20:06 +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);
|
struct eis_client *client = eis_device_get_client(device);
|
||||||
|
|
||||||
if (device->state != EIS_DEVICE_STATE_RESUMED)
|
switch (device->state) {
|
||||||
return;
|
case EIS_DEVICE_STATE_RESUMED:
|
||||||
|
case EIS_DEVICE_STATE_EMULATING:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
device->state = EIS_DEVICE_STATE_PAUSED;
|
device->state = EIS_DEVICE_STATE_PAUSED;
|
||||||
eis_device_event_paused(device, eis_client_get_next_serial(client));
|
eis_device_event_paused(device, eis_client_get_next_serial(client));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue