mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 04:45:58 +01:00
wlr_shm: 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 wl_shm 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:
parent
65bf7d1679
commit
0398d1b85a
2 changed files with 10 additions and 9 deletions
|
@ -22,7 +22,16 @@ struct wlr_renderer;
|
||||||
* Currently, accessing two buffers concurrently via
|
* Currently, accessing two buffers concurrently via
|
||||||
* wlr_buffer_begin_data_ptr_access() will return an error.
|
* wlr_buffer_begin_data_ptr_access() will return an error.
|
||||||
*/
|
*/
|
||||||
struct wlr_shm;
|
struct wlr_shm {
|
||||||
|
struct wl_global *global;
|
||||||
|
|
||||||
|
// private state
|
||||||
|
|
||||||
|
uint32_t *formats;
|
||||||
|
size_t formats_len;
|
||||||
|
|
||||||
|
struct wl_listener display_destroy;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create the wl_shm global.
|
* Create the wl_shm global.
|
||||||
|
|
|
@ -23,14 +23,6 @@
|
||||||
|
|
||||||
#define SHM_VERSION 1
|
#define SHM_VERSION 1
|
||||||
|
|
||||||
struct wlr_shm {
|
|
||||||
struct wl_global *global;
|
|
||||||
uint32_t *formats;
|
|
||||||
size_t formats_len;
|
|
||||||
|
|
||||||
struct wl_listener display_destroy;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct wlr_shm_pool {
|
struct wlr_shm_pool {
|
||||||
struct wl_resource *resource; // may be NULL
|
struct wl_resource *resource; // may be NULL
|
||||||
struct wlr_shm *shm;
|
struct wlr_shm *shm;
|
||||||
|
|
Loading…
Reference in a new issue