From 5b8b505af5d5925ae9e617ee8f3c7a0f9c43409d Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Thu, 23 Nov 2023 10:09:48 -0500 Subject: input: Query scene graph for relevant surface/node intersections --- sway/tree/view.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sway/tree/view.c') diff --git a/sway/tree/view.c b/sway/tree/view.c index bc968edc..d349e5fa 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -24,6 +24,7 @@ #include "sway/ipc-server.h" #include "sway/output.h" #include "sway/input/seat.h" +#include "sway/scene_descriptor.h" #include "sway/server.h" #include "sway/surface.h" #include "sway/tree/arrange.h" @@ -40,6 +41,12 @@ bool view_init(struct sway_view *view, enum sway_view_type type, bool failed = false; view->scene_tree = alloc_scene_tree(root->staging, &failed); view->content_tree = alloc_scene_tree(view->scene_tree, &failed); + + if (!failed && !scene_descriptor_assign(&view->scene_tree->node, + SWAY_SCENE_DESC_VIEW, view)) { + failed = true; + } + if (failed) { wlr_scene_node_destroy(&view->scene_tree->node); return false; -- cgit v1.2.3