mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-08 20:58:11 +02:00
libei: if we get disconnected after ei_device_add(), queue a removed event
If we get disconnected after calling ei_device_add() but before EIS saw and processed the event, we need to emulate a removed event ourselves. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
a41a025b65
commit
451875e287
1 changed files with 3 additions and 0 deletions
|
|
@ -302,6 +302,9 @@ ei_remove_device(struct ei_device *device)
|
|||
struct ei *ei = ei_device_get_context(device);
|
||||
int rc = connection_send_remove(ei, device);
|
||||
|
||||
if (ei->state == EI_STATE_DISCONNECTING)
|
||||
ei_queue_removed_event(device);
|
||||
|
||||
list_remove(&device->link);
|
||||
ei_device_unref(device);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue