aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2022-03-08 12:26:59 +0100
committerSimon Ser <contact@emersion.fr>2022-03-23 09:19:43 +0000
commit4cc2a03620b55113622379772c0b8890010fe7fa (patch)
treefb2b27c28a18df44d479078add55940b136a2a3f /include/wlr
parentaaf787ee5650e77f0bda4dea8e3ba8325e0e6b39 (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/wlr')
-rw-r--r--include/wlr/types/wlr_layer_shell_v1.h7
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