diff options
author | Guido Günther <agx@sigxcpu.org> | 2022-03-08 12:26:59 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-03-23 09:19:43 +0000 |
commit | 4cc2a03620b55113622379772c0b8890010fe7fa (patch) | |
tree | fb2b27c28a18df44d479078add55940b136a2a3f /include | |
parent | aaf787ee5650e77f0bda4dea8e3ba8325e0e6b39 (diff) |
layer-shell: Make wlr_layer_surface_v1_from_resource public
This allows compositors to leverage the `wl_instance_of` based type
check.
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_layer_shell_v1.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 |