desktop: don't use LAB_NODE_LAYER_SUBSURFACE node type

Instead, set ctx.type = LAB_NODE_LAYER_SURFACE for both layer-surfaces
and layer-subsurfaces.

This patch preserves the existing behaviors:
- Pressing a subsurface of an on-demand layer-surface gives pointer
  focus to the subsurface, but gives keyboard focus to the parent
  layer-surface (related: a5fcbfaf).
- Pressing a subsurface of a layer-surface doesn't close a popup
  (related: a89bcc3c).
This commit is contained in:
tokyo4j 2025-09-09 02:51:33 +09:00 committed by Hiroaki Yamamoto
parent 574b20fbff
commit 3d670b772d
6 changed files with 23 additions and 83 deletions

View file

@ -49,7 +49,6 @@ enum lab_node_type {
LAB_NODE_MENUITEM,
LAB_NODE_OSD,
LAB_NODE_LAYER_SURFACE,
LAB_NODE_LAYER_SUBSURFACE,
LAB_NODE_UNMANAGED,
LAB_NODE_ALL,

View file

@ -1,16 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef LABWC_SURFACE_HELPERS_H
#define LABWC_SURFACE_HELPERS_H
struct wlr_surface;
struct wlr_layer_surface_v1;
/**
* subsurface_parent_layer() - Get wlr_layer_surface from layer-subsurface
* @wlr_surface: The wlr_surface of the wlr_subsurface for which to get the
* layer-surface.
*/
struct wlr_layer_surface_v1 *subsurface_parent_layer(
struct wlr_surface *wlr_surface);
#endif /* LABWC_SURFACE_HELPERS_H */