]> git.mdlowis.com Git - proto/labwc.git/commitdiff
output: attach node-descriptors to node-trees
authorJohan Malm <jgm323@gmail.com>
Thu, 3 Mar 2022 18:20:16 +0000 (18:20 +0000)
committerJohan Malm <jgm323@gmail.com>
Thu, 3 Mar 2022 18:20:16 +0000 (18:20 +0000)
include/node.h
src/output.c

index 5cc7220eb6ccc8b97542ce083c1b28969e458abf..5704761c86eab0f375ea96ff648fbdcf7b050413 100644 (file)
@@ -15,6 +15,7 @@ enum node_descriptor_type {
        LAB_NODE_DESC_LAYER_SURFACE,
        LAB_NODE_DESC_LAYER_POPUP,
        LAB_NODE_DESC_MENUITEM,
+       LAB_NODE_DESC_TREE,
 };
 
 struct node_descriptor {
index fbd629a1e17d5ed0456e9dc0574348edf878e3e1..d24f422bbc4b9cc603014d3c01a88327daccc15e 100644 (file)
@@ -19,6 +19,7 @@
 #include "labwc.h"
 #include "layers.h"
 #include "menu/menu.h"
+#include "node.h"
 #include "ssd.h"
 #include "theme.h"
 
@@ -120,9 +121,12 @@ new_output_notify(struct wl_listener *listener, void *data)
                wl_list_init(&output->layers[i]);
                output->layer_tree[i] =
                        wlr_scene_tree_create(&server->scene->node);
-               output->layer_tree[i]->node.data = output->wlr_output;
+               node_descriptor_create(&output->layer_tree[i]->node,
+                       LAB_NODE_DESC_TREE, NULL);
        }
        output->layer_popup_tree = wlr_scene_tree_create(&server->scene->node);
+       node_descriptor_create(&output->layer_popup_tree->node,
+               LAB_NODE_DESC_TREE, NULL);
 
        /*
         * Set the z-positions to achieve the following order (from top to