
Following the wayland-cursor documentation [1] the buffer created by wl_cursor_image_get_buffer should not be destroyed. The new code avoid to destroy it by avoiding to connect the release callback to this buffer. [1] https://gitlab.freedesktop.org/wayland/wayland/-/blob/main/cursor/wayland-cursor.c#L147-L154