From c5eda09166ee2dc95c858e0f4040039f98c93650 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Fri, 15 Mar 2024 13:48:31 +0100 Subject: [PATCH] single-pixel-buffer: make wl_global public I wish to use a allowlist of globals for my security context implementation rather than a blocklist, which means I need access to the wp_single_pixel_buffer_manager_v1 global in order to allowlist it. I think using a allowlist will make it harder for me to accidentally expose globals to a security context that were meant to be restricted. --- include/wlr/types/wlr_single_pixel_buffer_v1.h | 9 ++++++++- types/wlr_single_pixel_buffer_v1.c | 6 ------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/wlr/types/wlr_single_pixel_buffer_v1.h b/include/wlr/types/wlr_single_pixel_buffer_v1.h index 747d2a6bb..3836203f8 100644 --- a/include/wlr/types/wlr_single_pixel_buffer_v1.h +++ b/include/wlr/types/wlr_single_pixel_buffer_v1.h @@ -11,7 +11,14 @@ #include -struct wlr_single_pixel_buffer_manager_v1; +struct wlr_single_pixel_buffer_manager_v1 { + struct wl_global *global; + + // private state + + struct wl_listener display_destroy; +}; + struct wlr_single_pixel_buffer_manager_v1 *wlr_single_pixel_buffer_manager_v1_create( struct wl_display *display); diff --git a/types/wlr_single_pixel_buffer_v1.c b/types/wlr_single_pixel_buffer_v1.c index 0ec8f73d9..2dab6c53c 100644 --- a/types/wlr_single_pixel_buffer_v1.c +++ b/types/wlr_single_pixel_buffer_v1.c @@ -8,12 +8,6 @@ #define SINGLE_PIXEL_MANAGER_VERSION 1 -struct wlr_single_pixel_buffer_manager_v1 { - struct wl_global *global; - - struct wl_listener display_destroy; -}; - struct wlr_single_pixel_buffer_v1 { struct wlr_buffer base; struct wl_resource *resource;