From 3699a2a7f6b311f53b18066396f7f8ca84e4f586 Mon Sep 17 00:00:00 2001 From: Consolatis <35009135+Consolatis@users.noreply.github.com> Date: Tue, 24 May 2022 19:51:15 +0200 Subject: [PATCH] desktop_node_and_view_at(): handle layer surfaces + Replace some tabs with spaces in include/node.h Fixes: #278 --- include/node.h | 8 ++++---- src/desktop.c | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/node.h b/include/node.h index 5704761c..07e6aff4 100644 --- a/include/node.h +++ b/include/node.h @@ -29,10 +29,10 @@ struct node_descriptor { * @scene_node: wlr_scene_node to attached node_descriptor to * @type: node descriptor type * @data: struct to point to as follows: - * - LAB_NODE_DESC_VIEW struct view - * - LAB_NODE_DESC_XDG_POPUP struct view - * - LAB_NODE_DESC_LAYER_SURFACE struct lab_layer_surface - * - LAB_NODE_DESC_LAYER_POPUP struct lab_layer_popup + * - LAB_NODE_DESC_VIEW struct view + * - LAB_NODE_DESC_XDG_POPUP struct view + * - LAB_NODE_DESC_LAYER_SURFACE struct lab_layer_surface + * - LAB_NODE_DESC_LAYER_POPUP struct lab_layer_popup */ void node_descriptor_create(struct wlr_scene_node *scene_node, enum node_descriptor_type type, void *data); diff --git a/src/desktop.c b/src/desktop.c index c9301a31..9169c1df 100644 --- a/src/desktop.c +++ b/src/desktop.c @@ -294,6 +294,11 @@ desktop_node_and_view_at(struct server *server, double lx, double ly, if (desc->type == LAB_NODE_DESC_XDG_POPUP) { goto has_view_data; } + if (desc->type == LAB_NODE_DESC_LAYER_SURFACE) { + /* FIXME: we shouldn't have to set *view_area */ + *view_area = LAB_SSD_CLIENT; + return NULL; + } if (desc->type == LAB_NODE_DESC_LAYER_POPUP) { /* FIXME: we shouldn't have to set *view_area */ *view_area = LAB_SSD_CLIENT; -- 2.52.0