mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
Handle key presses
This commit is contained in:
parent
0e75d157f5
commit
59ceaf507e
4 changed files with 95 additions and 10 deletions
|
|
@ -99,7 +99,12 @@ struct wlr_backend *wlr_libinput_backend_create(struct wl_display *display,
|
|||
struct wlr_backend *backend = wlr_backend_create(&backend_impl, state);
|
||||
if (!backend) {
|
||||
wlr_log(L_ERROR, "Allocation failed: %s", strerror(errno));
|
||||
return NULL;
|
||||
goto error_state;
|
||||
}
|
||||
|
||||
if (!(state->keyboards = list_create())) {
|
||||
wlr_log(L_ERROR, "Allocation failed: %s", strerror(errno));
|
||||
goto error_backend;
|
||||
}
|
||||
|
||||
state->backend = backend;
|
||||
|
|
@ -107,7 +112,10 @@ struct wlr_backend *wlr_libinput_backend_create(struct wl_display *display,
|
|||
state->udev = udev;
|
||||
state->display = display;
|
||||
|
||||
state->keyboards = list_create();
|
||||
|
||||
return backend;
|
||||
error_state:
|
||||
free(state);
|
||||
error_backend:
|
||||
wlr_backend_destroy(backend);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue