From bd5c4f4a4a79743df77db40d18eb32686312f320 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Wed, 26 Jul 2023 11:36:24 +0300 Subject: xdg-shell: rework roles --- include/wlr/types/wlr_xdg_shell.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h index 9cae226c..1b15bfe4 100644 --- a/include/wlr/types/wlr_xdg_shell.h +++ b/include/wlr/types/wlr_xdg_shell.h @@ -231,8 +231,18 @@ struct wlr_xdg_surface { struct wl_resource *resource; struct wlr_surface *surface; struct wl_list link; // wlr_xdg_client.surfaces + + /** + * The lifetime-bound role of the xdg_surface. WLR_XDG_SURFACE_ROLE_NONE + * if the role was never set. + */ enum wlr_xdg_surface_role role; + /** + * The role object representing the role. NULL if the object was destroyed. + */ + struct wl_resource *role_resource; + // NULL if the role resource is inert union { struct wlr_xdg_toplevel *toplevel; struct wlr_xdg_popup *popup; @@ -247,8 +257,6 @@ struct wlr_xdg_surface { struct wlr_xdg_surface_state current, pending; - struct wl_listener surface_commit; - struct { struct wl_signal destroy; struct wl_signal ping_timeout; @@ -260,6 +268,11 @@ struct wlr_xdg_surface { } events; void *data; + + // private state + + bool client_mapped; + struct wl_listener role_resource_destroy; }; struct wlr_xdg_toplevel_move_event { -- cgit v1.2.3