aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Lindgren <john@jlindgren.net>2023-09-22 21:13:20 -0400
committerJohn Lindgren <john@jlindgren.net>2023-09-22 21:18:16 -0400
commit1a731596c5bcd252d8796cacb59af8b20ceb914f (patch)
treef659e139dc789401cc3c1bf58260b9269067db0d
parent98a745d926d8048bc30aef11b421df207a01c279 (diff)
wlr_scene: clarify wlr_scene_output ownership semantics
wlr_scene_output_layout_add_output() was made public by f5917f024760 ("scene_output_layout: make output adding explicit") but the ownership semantics are not obvious and should be clarified.
-rw-r--r--include/wlr/types/wlr_scene.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h
index 3af839ab..a756e88e 100644
--- a/include/wlr/types/wlr_scene.h
+++ b/include/wlr/types/wlr_scene.h
@@ -529,6 +529,9 @@ struct wlr_scene_output_layout *wlr_scene_attach_output_layout(struct wlr_scene
/**
* Add an output to the scene, with its positioning defined by the output layout.
+ *
+ * The `wlr_scene_output_layout` takes ownership of the `wlr_scene_output`, which will be destroyed
+ * when either the `wlr_scene_output_layout` or the `wlr_output_layout_output` is destroyed.
*/
void wlr_scene_output_layout_add_output(struct wlr_scene_output_layout *sol,
struct wlr_output_layout_output *lo, struct wlr_scene_output *so);