layer-shell: Make wlr_layer_surface_v1_from_resource public

This allows compositors to leverage the `wl_instance_of` based type
check.
This commit is contained in:
Guido Günther 2022-03-08 12:26:59 +01:00 committed by Simon Ser
parent aaf787ee56
commit 4cc2a03620
2 changed files with 21 additions and 10 deletions

View file

@ -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