summaryrefslogtreecommitdiff
path: root/subsurface_tree.c
diff options
context:
space:
mode:
authorAlexander Orzechowski <[email protected]>2022-05-30 19:23:27 -0400
committerIsaac Freund <[email protected]>2022-05-31 09:14:28 +0000
commit3a68007693f9d91c3b6dc12a204455df36ae65a1 (patch)
tree5f94066a759f10ff958f091854ef6ac8a7cbf98f /subsurface_tree.c
parent6975c82d95080589882b71083f67dc905e5a7f80 (diff)
wlr_scene: Only allow parenting on a wlr_scene_tree
Diffstat (limited to 'subsurface_tree.c')
-rw-r--r--subsurface_tree.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/subsurface_tree.c b/subsurface_tree.c
index 1cb2977..35420ab 100644
--- a/subsurface_tree.c
+++ b/subsurface_tree.c
@@ -148,13 +148,13 @@ static const struct wlr_addon_interface subsurface_tree_addon_impl = {
};
static struct wlr_scene_subsurface_tree *scene_surface_tree_create(
- struct wlr_scene_node *parent, struct wlr_surface *surface);
+ struct wlr_scene_tree *parent, struct wlr_surface *surface);
static bool subsurface_tree_create_subsurface(
struct wlr_scene_subsurface_tree *parent,
struct wlr_subsurface *subsurface) {
struct wlr_scene_subsurface_tree *child = scene_surface_tree_create(
- &parent->tree->node, subsurface->surface);
+ parent->tree, subsurface->surface);
if (child == NULL) {
return false;
}
@@ -188,7 +188,7 @@ static void subsurface_tree_handle_surface_new_subsurface(
}
static struct wlr_scene_subsurface_tree *scene_surface_tree_create(
- struct wlr_scene_node *parent, struct wlr_surface *surface) {
+ struct wlr_scene_tree *parent, struct wlr_surface *surface) {
struct wlr_scene_subsurface_tree *subsurface_tree =
calloc(1, sizeof(*subsurface_tree));
if (subsurface_tree == NULL) {
@@ -201,7 +201,7 @@ static struct wlr_scene_subsurface_tree *scene_surface_tree_create(
}
subsurface_tree->scene_surface =
- wlr_scene_surface_create(&subsurface_tree->tree->node, surface);
+ wlr_scene_surface_create(subsurface_tree->tree, surface);
if (subsurface_tree->scene_surface == NULL) {
goto error_scene_surface;
}
@@ -248,12 +248,12 @@ error_surface_tree:
return NULL;
}
-struct wlr_scene_node *wlr_scene_subsurface_tree_create(
- struct wlr_scene_node *parent, struct wlr_surface *surface) {
+struct wlr_scene_tree *wlr_scene_subsurface_tree_create(
+ struct wlr_scene_tree *parent, struct wlr_surface *surface) {
struct wlr_scene_subsurface_tree *subsurface_tree =
scene_surface_tree_create(parent, surface);
if (subsurface_tree == NULL) {
return NULL;
}
- return &subsurface_tree->tree->node;
+ return subsurface_tree->tree;
}