Add node-descriptor for wlr_scene_nodes

Support identification of wlr_scene_node role to enable simplification
of codebase including the avoidance of iterating over lists of
layer-surface, menuitems, and so on.

Use node-descriptors for xdg toplevels and popups
This commit is contained in:
Johan Malm 2022-02-25 22:31:24 +00:00
parent 4c981b845f
commit 2891ff245e
7 changed files with 92 additions and 6 deletions

View file

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <assert.h>
#include "labwc.h"
#include "node-descriptor.h"
#include "ssd.h"
static void
@ -404,7 +405,8 @@ xdg_surface_new(struct wl_listener *listener, void *data)
wl_resource_post_no_memory(view->surface->resource);
return;
}
view->scene_tree->node.data = view;
node_descriptor_create(&view->scene_tree->node,
LAB_NODE_DESC_VIEW, view);
/* In support of xdg_toplevel_decoration */
xdg_surface->data = view;