diff options
author | Alexander Orzechowski <orzechowski.alexander@gmail.com> | 2022-05-19 14:01:44 -0400 |
---|---|---|
committer | Alexander Orzechowski <orzechowski.alexander@gmail.com> | 2022-05-19 14:24:05 -0400 |
commit | 5f562465717ae4d5afd518cd3adf5c84e83ce2d4 (patch) | |
tree | 325daaf9dc1e4caf5dd8af58d5bbc6a2975a9bdc | |
parent | 39c059b70ee86be3de84f48bb62965fbf5047cd2 (diff) |
wlr_scene: Pull scene_node_get_root into a private header
We will need this for surface emulation on buffers.
-rw-r--r-- | include/types/wlr_scene.h | 8 | ||||
-rw-r--r-- | types/scene/wlr_scene.c | 3 |
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; } |