mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-01 15:37:58 +02:00
Suspend libinput before destroying it
libinput_suspend() already causes the fds to be closed, devices and seats to be removed, etc. Call it before libinput_destroy() to reduce the backend-specific code. No real functional change, the udev backend already did this anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
93fbb5e05f
commit
3cf9cd9c86
2 changed files with 2 additions and 1 deletions
|
|
@ -414,6 +414,8 @@ libinput_destroy(struct libinput *libinput)
|
||||||
if (libinput == NULL)
|
if (libinput == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
libinput_suspend(libinput);
|
||||||
|
|
||||||
libinput->interface_backend->destroy(libinput);
|
libinput->interface_backend->destroy(libinput);
|
||||||
|
|
||||||
while ((event = libinput_get_event(libinput)))
|
while ((event = libinput_get_event(libinput)))
|
||||||
|
|
|
||||||
|
|
@ -305,7 +305,6 @@ udev_input_destroy(struct libinput *input)
|
||||||
if (input == NULL)
|
if (input == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
udev_input_disable(input);
|
|
||||||
udev_unref(udev_input->udev);
|
udev_unref(udev_input->udev);
|
||||||
free(udev_input->seat_id);
|
free(udev_input->seat_id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue