diff options
author | Alexander Orzechowski <orzechowski.alexander@gmail.com> | 2022-05-19 14:25:34 -0400 |
---|---|---|
committer | Alexander Orzechowski <orzechowski.alexander@gmail.com> | 2022-05-19 14:25:34 -0400 |
commit | 5f43e1732a5933513790ebe306607a89bc9c0ad9 (patch) | |
tree | 230935cdca0d62bf37f0a2806e089d3d3aea9cae | |
parent | f2dbcc33582b734f2fc95dac3b12320a19fa7b6e (diff) |
wlr_scene: Introduce addons to scene nodes
-rw-r--r-- | include/wlr/types/wlr_scene.h | 2 | ||||
-rw-r--r-- | types/scene/wlr_scene.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h index f390c278..02088150 100644 --- a/include/wlr/types/wlr_scene.h +++ b/include/wlr/types/wlr_scene.h @@ -68,6 +68,8 @@ struct wlr_scene_node { } events; void *data; + + struct wlr_addon_set addons; }; /** The root scene-graph node. */ diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 89d48c11..f4fab207 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -67,6 +67,8 @@ static void scene_node_init(struct wlr_scene_node *node, if (parent != NULL) { wl_list_insert(parent->state.children.prev, &node->state.link); } + + wlr_addon_set_init(&node->addons); } static void scene_node_damage_whole(struct wlr_scene_node *node); @@ -133,6 +135,7 @@ void wlr_scene_node_destroy(struct wlr_scene_node *node) { wlr_scene_node_destroy(child); } + wlr_addon_set_finish(&node->addons); scene_node_state_finish(&node->state); free(node); } |