From b2c71287f29cec22217177d11e8692e73b805b66 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Mon, 11 Sep 2017 18:06:19 -0400 Subject: set toplevel role on wlr_surface --- include/wlr/types/wlr_surface.h | 8 ++++++++ include/wlr/types/wlr_xdg_shell_v6.h | 7 +++++++ 2 files changed, 15 insertions(+) (limited to 'include') diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h index 0a802ea3..d76fff16 100644 --- a/include/wlr/types/wlr_surface.h +++ b/include/wlr/types/wlr_surface.h @@ -70,4 +70,12 @@ void wlr_surface_get_matrix(struct wlr_surface *surface, const float (*projection)[16], const float (*transform)[16]); + +/** + * Set the lifetime role for this surface. Returns 0 on success or -1 if the + * role cannot be set. + */ +int wlr_surface_set_role(struct wlr_surface *surface, const char *role, + struct wl_resource *error_resource, uint32_t error_code); + #endif diff --git a/include/wlr/types/wlr_xdg_shell_v6.h b/include/wlr/types/wlr_xdg_shell_v6.h index 500dae87..6bc37940 100644 --- a/include/wlr/types/wlr_xdg_shell_v6.h +++ b/include/wlr/types/wlr_xdg_shell_v6.h @@ -10,10 +10,17 @@ struct wlr_xdg_shell_v6 { void *data; }; +enum wlr_xdg_surface_v6_role { + WLR_XDG_SURFACE_V6_ROLE_NONE, + WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL, + WLR_XDG_SURFACE_V6_ROLE_POPUP, +}; + struct wlr_xdg_surface_v6 { struct wl_resource *resource; struct wl_resource *surface; struct wl_list link; + enum wlr_xdg_surface_v6_role role; struct wl_listener surface_destroy_listener; -- cgit v1.2.3