]> git.mdlowis.com Git - proto/labwc.git/commitdiff
desktop_node_and_view_at(): handle layer surfaces
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Tue, 24 May 2022 17:51:15 +0000 (19:51 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Wed, 25 May 2022 20:48:28 +0000 (21:48 +0100)
+ Replace some tabs with spaces in include/node.h

Fixes: #278
include/node.h
src/desktop.c

index 5704761c86eab0f375ea96ff648fbdcf7b050413..07e6aff44df0b1cb0929efcd4c1e2a1761e8a82c 100644 (file)
@@ -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);
index c9301a31062fa2ba05cfd5a09fde9ae434cd681f..9169c1dfdfbe36c6a2b774ddfd7f6fefb987dc36 100644 (file)
@@ -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;