From: Peter Hutterer Date: Tue, 7 Jan 2014 04:54:55 +0000 (+1000) Subject: Suspend libinput before destroying it X-Git-Tag: 0.1.0~93 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3cf9cd9c86643e435bfdd0a682fdc0e80c79a056;p=platform%2Fupstream%2Flibinput.git 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 --- diff --git a/src/libinput.c b/src/libinput.c index 98f52edb..7d564278 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -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))) diff --git a/src/udev-seat.c b/src/udev-seat.c index 97f8259c..610b45d3 100644 --- a/src/udev-seat.c +++ b/src/udev-seat.c @@ -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); }