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.
This commit is contained in:
Isaac Freund 2024-03-15 13:45:58 +01:00 committed by Simon Ser
parent 0398d1b85a
commit af4987c751
2 changed files with 11 additions and 10 deletions

View File

@ -16,7 +16,17 @@ struct wlr_seat;
/** /**
* An idle notifier, implementing the ext-idle-notify-v1 protocol. * 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. * Create the ext_idle_notifier_v1 global.

View File

@ -6,15 +6,6 @@
#define IDLE_NOTIFIER_VERSION 1 #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 wlr_idle_notification_v1 {
struct wl_resource *resource; struct wl_resource *resource;
struct wl_list link; // wlr_idle_notifier_v1.notifications struct wl_list link; // wlr_idle_notifier_v1.notifications