output: attach node-descriptors to node-trees

This commit is contained in:
Johan Malm 2022-03-03 18:20:16 +00:00
parent 6fd400b493
commit 19f3a6ef83
2 changed files with 6 additions and 1 deletions

View file

@ -15,6 +15,7 @@ enum node_descriptor_type {
LAB_NODE_DESC_LAYER_SURFACE, LAB_NODE_DESC_LAYER_SURFACE,
LAB_NODE_DESC_LAYER_POPUP, LAB_NODE_DESC_LAYER_POPUP,
LAB_NODE_DESC_MENUITEM, LAB_NODE_DESC_MENUITEM,
LAB_NODE_DESC_TREE,
}; };
struct node_descriptor { struct node_descriptor {

View file

@ -19,6 +19,7 @@
#include "labwc.h" #include "labwc.h"
#include "layers.h" #include "layers.h"
#include "menu/menu.h" #include "menu/menu.h"
#include "node.h"
#include "ssd.h" #include "ssd.h"
#include "theme.h" #include "theme.h"
@ -120,9 +121,12 @@ new_output_notify(struct wl_listener *listener, void *data)
wl_list_init(&output->layers[i]); wl_list_init(&output->layers[i]);
output->layer_tree[i] = output->layer_tree[i] =
wlr_scene_tree_create(&server->scene->node); 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); 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 * Set the z-positions to achieve the following order (from top to