mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
wlr_scene: Introduce addons to scene nodes
This commit is contained in:
parent
f2dbcc3358
commit
5f43e1732a
2 changed files with 5 additions and 0 deletions
|
@ -68,6 +68,8 @@ struct wlr_scene_node {
|
||||||
} events;
|
} events;
|
||||||
|
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
|
struct wlr_addon_set addons;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** The root scene-graph node. */
|
/** The root scene-graph node. */
|
||||||
|
|
|
@ -67,6 +67,8 @@ static void scene_node_init(struct wlr_scene_node *node,
|
||||||
if (parent != NULL) {
|
if (parent != NULL) {
|
||||||
wl_list_insert(parent->state.children.prev, &node->state.link);
|
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);
|
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_scene_node_destroy(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wlr_addon_set_finish(&node->addons);
|
||||||
scene_node_state_finish(&node->state);
|
scene_node_state_finish(&node->state);
|
||||||
free(node);
|
free(node);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue