From 88f80c4a7caacc0263fad27173a2abd56b482c51 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Sun, 5 Jun 2022 13:06:18 -0400 Subject: wlr_scene: Make scene_tree_from_node public This is to allow for compositors that want to be more implicit about how their scene is organized. Such a compositor may want to walk up at a certain scene node to find something such as a surface to focus on. --- include/wlr/types/wlr_scene.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h index ca4641fa..aa371d13 100644 --- a/include/wlr/types/wlr_scene.h +++ b/include/wlr/types/wlr_scene.h @@ -323,6 +323,12 @@ struct wlr_scene_surface *wlr_scene_surface_create(struct wlr_scene_tree *parent */ struct wlr_scene_buffer *wlr_scene_buffer_from_node(struct wlr_scene_node *node); +/** + * If this node represents a wlr_scene_tree, that tree will be returned. It + * is not legal to feed a node that does not represent a wlr_scene_tree. + */ +struct wlr_scene_tree *wlr_scene_tree_from_node(struct wlr_scene_node *node); + /** * If this buffer is backed by a surface, then the struct wlr_scene_surface is * returned. If not, NULL will be returned. -- cgit v1.2.3