mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-15 08:22:07 -04:00
wlr_scene: Keep track of all surfaces for subsurface_tree
This commit is contained in:
parent
1901c34e81
commit
3a997b7454
2 changed files with 9 additions and 0 deletions
|
|
@ -133,6 +133,10 @@ struct wlr_scene_surface {
|
|||
|
||||
struct wlr_scene_subsurface_tree {
|
||||
struct wlr_scene_tree *tree;
|
||||
|
||||
// private state
|
||||
|
||||
struct wl_list surfaces;
|
||||
};
|
||||
|
||||
/** A scene-graph node displaying a solid-colored rectangle */
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ struct wlr_scene_subsurface_tree_surface {
|
|||
struct wlr_addon scene_addon;
|
||||
|
||||
struct wlr_box clip;
|
||||
struct wl_list link;
|
||||
|
||||
// Only valid if the surface is a sub-surface
|
||||
|
||||
|
|
@ -52,6 +53,7 @@ static void subsurface_tree_addon_destroy(struct wlr_addon *addon) {
|
|||
wl_list_remove(&subsurface_tree->surface_map.link);
|
||||
wl_list_remove(&subsurface_tree->surface_unmap.link);
|
||||
wl_list_remove(&subsurface_tree->surface_new_subsurface.link);
|
||||
wl_list_remove(&subsurface_tree->link);
|
||||
free(subsurface_tree);
|
||||
}
|
||||
|
||||
|
|
@ -276,6 +278,7 @@ static struct wlr_scene_subsurface_tree_surface *scene_surface_tree_create_surfa
|
|||
}
|
||||
}
|
||||
|
||||
wl_list_insert(&tree->surfaces, &subsurface_tree->link);
|
||||
subsurface_tree_reconfigure(subsurface_tree);
|
||||
|
||||
wlr_addon_init(&subsurface_tree->scene_addon, &subsurface_tree->tree->node.addons,
|
||||
|
|
@ -316,6 +319,8 @@ struct wlr_scene_subsurface_tree *wlr_scene_subsurface_tree_create(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
wl_list_init(&subsurface_tree->surfaces);
|
||||
|
||||
struct wlr_scene_subsurface_tree_surface *subsurface_tree_surface =
|
||||
scene_surface_tree_create_surface(subsurface_tree, parent, surface);
|
||||
if (subsurface_tree_surface == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue