aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-01-20 09:55:21 +0100
committerKirill Primak <vyivel@eclair.cafe>2022-01-20 15:18:10 +0000
commit7ce966a5d4c73cfe37f3538e887f2ec915b1a1dc (patch)
tree571392bcfda172d6b8e156ebb9b21c12812f454d
parentcfba4c634497949d490fb8a72f457ee5c809de09 (diff)
subcompositor: document subsurface_from_resource
-rw-r--r--types/wlr_subcompositor.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/types/wlr_subcompositor.c b/types/wlr_subcompositor.c
index 397baf8c..e9d53f53 100644
--- a/types/wlr_subcompositor.c
+++ b/types/wlr_subcompositor.c
@@ -61,6 +61,12 @@ static void subsurface_destroy(struct wlr_subsurface *subsurface) {
static const struct wl_subsurface_interface subsurface_implementation;
+/**
+ * Get a wlr_subsurface from a wl_subsurface resource.
+ *
+ * Returns NULL if the subsurface is inert (e.g. the wl_surface object got
+ * destroyed).
+ */
static struct wlr_subsurface *subsurface_from_resource(
struct wl_resource *resource) {
assert(wl_resource_instance_of(resource, &wl_subsurface_interface,