From af4987c75155b787da6970226ca374aa6b32ace4 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Fri, 15 Mar 2024 13:45:58 +0100 Subject: [PATCH] idle-notify: 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 ext_idle_notifier_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_idle_notify_v1.h | 12 +++++++++++- types/wlr_idle_notify_v1.c | 9 --------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/wlr/types/wlr_idle_notify_v1.h b/include/wlr/types/wlr_idle_notify_v1.h index 7bc11cb7..8dea0804 100644 --- a/include/wlr/types/wlr_idle_notify_v1.h +++ b/include/wlr/types/wlr_idle_notify_v1.h @@ -16,7 +16,17 @@ struct wlr_seat; /** * An idle notifier, implementing the ext-idle-notify-v1 protocol. */ -struct wlr_idle_notifier_v1; +struct wlr_idle_notifier_v1 { + struct wl_global *global; + + // private state + + bool inhibited; + struct wl_list notifications; // wlr_idle_notification_v1.link + + struct wl_listener display_destroy; +}; + /** * Create the ext_idle_notifier_v1 global. diff --git a/types/wlr_idle_notify_v1.c b/types/wlr_idle_notify_v1.c index 6283dc6a..686ddccc 100644 --- a/types/wlr_idle_notify_v1.c +++ b/types/wlr_idle_notify_v1.c @@ -6,15 +6,6 @@ #define IDLE_NOTIFIER_VERSION 1 -struct wlr_idle_notifier_v1 { - struct wl_global *global; - - bool inhibited; - struct wl_list notifications; // wlr_idle_notification_v1.link - - struct wl_listener display_destroy; -}; - struct wlr_idle_notification_v1 { struct wl_resource *resource; struct wl_list link; // wlr_idle_notifier_v1.notifications