From 378f471d292ead8e5286d517a811c8726aa07959 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 6 Dec 2022 20:14:44 +0100 Subject: [PATCH] backend/wayland: ensure buffers are released on shutdown destroy_wl_buffer() is called from backend_destroy(). We need to ensure the wlr_buffer is unlocked when we're waiting for a wl_buffer.release event from the parent compositor. --- backend/wayland/output.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/wayland/output.c b/backend/wayland/output.c index ca16cbf5..1e96f03b 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -116,6 +116,9 @@ void destroy_wl_buffer(struct wlr_wl_buffer *buffer) { wl_list_remove(&buffer->buffer_destroy.link); wl_list_remove(&buffer->link); wl_buffer_destroy(buffer->wl_buffer); + if (!buffer->released) { + wlr_buffer_unlock(buffer->buffer); + } free(buffer); }