From a0baba4fa0fc391aaf896618fe882fd321a1cbb7 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 9 Jul 2021 17:06:28 +0200 Subject: buffer: add wlr_client_buffer.source This stores a weak reference to the source buffer. --- include/wlr/types/wlr_buffer.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_buffer.h b/include/wlr/types/wlr_buffer.h index 6327bbfb..d305f4d4 100644 --- a/include/wlr/types/wlr_buffer.h +++ b/include/wlr/types/wlr_buffer.h @@ -136,10 +136,15 @@ struct wlr_client_buffer { * client destroys the buffer before it has been released. */ struct wlr_texture *texture; + /** + * The buffer this client buffer was created from. NULL if destroyed. + */ + struct wlr_buffer *source; // private state struct wl_listener resource_destroy; + struct wl_listener source_destroy; // If the client buffer has been created from a wl_shm buffer uint32_t shm_source_format; -- cgit v1.2.3