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:
Peter Hutterer 2014-01-07 14:54:55 +10:00
parent 93fbb5e05f
commit 3cf9cd9c86
2 changed files with 2 additions and 1 deletions

View file

@ -414,6 +414,8 @@ libinput_destroy(struct libinput *libinput)
if (libinput == NULL)
return;
libinput_suspend(libinput);
libinput->interface_backend->destroy(libinput);
while ((event = libinput_get_event(libinput)))

View file

@ -305,7 +305,6 @@ udev_input_destroy(struct libinput *input)
if (input == NULL)
return;
udev_input_disable(input);
udev_unref(udev_input->udev);
free(udev_input->seat_id);
}