diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-06-09 11:38:38 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-06-13 08:10:36 -0400 |
commit | af69591e6233c83ed749b2f51922edb45bdaef2e (patch) | |
tree | 991d104756067368c2ac7e85a8a94844d8b5926b /backend/libinput | |
parent | 1262f1400c6f443a1460e168c7adc25997247cde (diff) |
Add error handling and init in backend_autocreate
Diffstat (limited to 'backend/libinput')
-rw-r--r-- | backend/libinput/backend.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c index 6142bde3..b49bf6b4 100644 --- a/backend/libinput/backend.c +++ b/backend/libinput/backend.c @@ -34,14 +34,17 @@ static void wlr_libinput_log(struct libinput *libinput, } static bool wlr_libinput_backend_init(struct wlr_backend_state *state) { + wlr_log(L_DEBUG, "Initializing libinput"); state->handle = libinput_udev_create_context(&libinput_impl, state, state->udev->udev); if (!state->handle) { + wlr_log(L_ERROR, "Failed to create libinput context"); return false; } // TODO: Let user customize seat used if (!libinput_udev_assign_seat(state->handle, "seat0")) { + wlr_log(L_ERROR, "Failed to assign libinput seat"); return false; } @@ -58,8 +61,10 @@ static bool wlr_libinput_backend_init(struct wlr_backend_state *state) { libinput_get_fd(state->handle), WL_EVENT_READABLE, wlr_libinput_handle_event, state); if (!state->input_event) { + wlr_log(L_ERROR, "Failed to create input event on event loop"); return false; } + wlr_log(L_DEBUG, "libinput sucessfully initialized"); return true; } |