From e70afebfc9febde027c5620ce8f86205d388d2e8 Mon Sep 17 00:00:00 2001 From: Consolatis <40171-Consolatis@users.noreply.gitlab.freedesktop.org> Date: Tue, 23 Apr 2024 19:27:22 +0200 Subject: [PATCH] scene: do not reset scene_buffer state on buffer release This fixes an issue with some buffers not rendering anymore due to buffer_width and buffer_height being reset on buffer release. --- types/scene/wlr_scene.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 514c0e15..6010c9d0 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -608,7 +608,10 @@ static void scene_buffer_handle_buffer_release(struct wl_listener *listener, void *data) { struct wlr_scene_buffer *scene_buffer = wl_container_of(listener, scene_buffer, buffer_release); - scene_buffer_set_buffer(scene_buffer, NULL); + + scene_buffer->buffer = NULL; + wl_list_remove(&scene_buffer->buffer_release.link); + wl_list_init(&scene_buffer->buffer_release.link); } static void scene_buffer_set_buffer(struct wlr_scene_buffer *scene_buffer,