backend/libinput: terminate display on error

master
Simon Ser 4 years ago committed by Kenny Levinsen
parent 7f09085461
commit 846e0838d6

@ -47,9 +47,10 @@ static const struct libinput_interface libinput_impl = {
static int handle_libinput_readable(int fd, uint32_t mask, void *_backend) { static int handle_libinput_readable(int fd, uint32_t mask, void *_backend) {
struct wlr_libinput_backend *backend = _backend; struct wlr_libinput_backend *backend = _backend;
if (libinput_dispatch(backend->libinput_context) != 0) { int ret = libinput_dispatch(backend->libinput_context);
wlr_log(WLR_ERROR, "Failed to dispatch libinput"); if (ret != 0) {
// TODO: some kind of abort? wlr_log(WLR_ERROR, "Failed to dispatch libinput: %s", strerror(-ret));
wl_display_terminate(backend->display);
return 0; return 0;
} }
struct libinput_event *event; struct libinput_event *event;

Loading…
Cancel
Save