From 4cc2a03620b55113622379772c0b8890010fe7fa Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Tue, 8 Mar 2022 12:26:59 +0100 Subject: layer-shell: Make wlr_layer_surface_v1_from_resource public This allows compositors to leverage the `wl_instance_of` based type check. --- include/wlr/types/wlr_layer_shell_v1.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/wlr/types/wlr_layer_shell_v1.h b/include/wlr/types/wlr_layer_shell_v1.h index 370fad83..fcb72f24 100644 --- a/include/wlr/types/wlr_layer_shell_v1.h +++ b/include/wlr/types/wlr_layer_shell_v1.h @@ -178,4 +178,11 @@ struct wlr_surface *wlr_layer_surface_v1_popup_surface_at( struct wlr_layer_surface_v1 *surface, double sx, double sy, double *sub_x, double *sub_y); +/** Get the corresponding wlr_layer_surface_v1 from a resource. + * + * Aborts if the resource doesn't have the correct type. + */ +struct wlr_layer_surface_v1 *wlr_layer_surface_v1_from_resource( + struct wl_resource *resource); + #endif -- cgit v1.2.3