aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/types/wlr_scene.h8
-rw-r--r--types/scene/wlr_scene.c3
2 files changed, 10 insertions, 1 deletions
diff --git a/include/types/wlr_scene.h b/include/types/wlr_scene.h
new file mode 100644
index 00000000..64c11bc6
--- /dev/null
+++ b/include/types/wlr_scene.h
@@ -0,0 +1,8 @@
+#ifndef TYPES_WLR_SCENE_H
+#define TYPES_WLR_SCENE_H
+
+#include <wlr/types/wlr_scene.h>
+
+struct wlr_scene *scene_node_get_root(struct wlr_scene_node *node);
+
+#endif
diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c
index 6e940cbc..823ddcf0 100644
--- a/types/scene/wlr_scene.c
+++ b/types/scene/wlr_scene.c
@@ -10,6 +10,7 @@
#include <wlr/types/wlr_scene.h>
#include <wlr/util/log.h>
#include <wlr/util/region.h>
+#include "types/wlr_scene.h"
#include "util/signal.h"
static struct wlr_scene *scene_root_from_node(struct wlr_scene_node *node) {
@@ -35,7 +36,7 @@ struct wlr_scene_buffer *wlr_scene_buffer_from_node(
return (struct wlr_scene_buffer *)node;
}
-static struct wlr_scene *scene_node_get_root(struct wlr_scene_node *node) {
+struct wlr_scene *scene_node_get_root(struct wlr_scene_node *node) {
while (node->parent != NULL) {
node = node->parent;
}