From 8fe2dd82b1ff812d2d1609cec81f4d75eb782eba Mon Sep 17 00:00:00 2001 From: nerdopolis Date: Mon, 20 May 2024 23:28:30 -0400 Subject: [PATCH] backend/libinput: Fix call of handle_libinput_readable() when WLR_LIBINPUT_NO_DEVICES is set (cherry picked from commit 35c3194ae55ed977fcb0f3ee5d234e50a21c3ca3) --- backend/libinput/backend.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c index cbdf8b72e..df4b45e12 100644 --- a/backend/libinput/backend.c +++ b/backend/libinput/backend.c @@ -106,13 +106,11 @@ static bool backend_start(struct wlr_backend *wlr_backend) { int libinput_fd = libinput_get_fd(backend->libinput_context); + handle_libinput_readable(libinput_fd, WL_EVENT_READABLE, backend); if (!env_parse_bool("WLR_LIBINPUT_NO_DEVICES") && wl_list_empty(&backend->devices)) { - handle_libinput_readable(libinput_fd, WL_EVENT_READABLE, backend); - if (wl_list_empty(&backend->devices)) { - wlr_log(WLR_ERROR, "libinput initialization failed, no input devices"); - wlr_log(WLR_ERROR, "Set WLR_LIBINPUT_NO_DEVICES=1 to suppress this check"); - return false; - } + wlr_log(WLR_ERROR, "libinput initialization failed, no input devices"); + wlr_log(WLR_ERROR, "Set WLR_LIBINPUT_NO_DEVICES=1 to suppress this check"); + return false; } struct wl_event_loop *event_loop =