diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/headless/output.c | 2 | ||||
-rw-r--r-- | backend/libinput/backend.c | 4 | ||||
-rw-r--r-- | backend/wayland/wl_seat.c | 10 |
3 files changed, 11 insertions, 5 deletions
diff --git a/backend/headless/output.c b/backend/headless/output.c index ba4a094e..6ce8fc35 100644 --- a/backend/headless/output.c +++ b/backend/headless/output.c @@ -67,6 +67,8 @@ static void output_destroy(struct wlr_output *wlr_output) { wl_list_remove(&output->link); + wl_event_source_remove(output->frame_timer); + eglDestroySurface(output->backend->egl.display, output->egl_surface); free(output); } diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c index 71fe0d93..1e7c1ad4 100644 --- a/backend/libinput/backend.c +++ b/backend/libinput/backend.c @@ -118,7 +118,9 @@ static void wlr_libinput_backend_destroy(struct wlr_backend *wlr_backend) { wl_list_remove(&backend->session_signal.link); wlr_list_finish(&backend->wlr_device_lists); - wl_event_source_remove(backend->input_event); + if (backend->input_event) { + wl_event_source_remove(backend->input_event); + } libinput_unref(backend->libinput_context); free(backend); } diff --git a/backend/wayland/wl_seat.c b/backend/wayland/wl_seat.c index b1f7cff6..841e693d 100644 --- a/backend/wayland/wl_seat.c +++ b/backend/wayland/wl_seat.c @@ -163,10 +163,12 @@ static void keyboard_handle_key(void *data, struct wl_keyboard *wl_keyboard, struct wlr_input_device *dev = data; assert(dev && dev->keyboard); - struct wlr_event_keyboard_key wlr_event; - wlr_event.keycode = key; - wlr_event.state = state; - wlr_event.time_msec = time; + struct wlr_event_keyboard_key wlr_event = { + .keycode = key, + .state = state, + .time_msec = time, + .update_state = false, + }; wlr_keyboard_notify_key(dev->keyboard, &wlr_event); } |