summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@proton.me>2023-11-25 12:48:54 -0600
committerLeonardo Hernández Hernández <leohdz172@proton.me>2023-11-25 19:06:17 -0600
commita353eee2cac0378a4201e408a3417aa107a7f647 (patch)
tree448b40a90b10d074aac4eb1c1fbcd8098a22342d
parent66ec028b0056b834442a7ede6544eae8709946c0 (diff)
simplify settings popups scene tree parent
-rw-r--r--dwl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/dwl.c b/dwl.c
index ea0a791..8500f2b 100644
--- a/dwl.c
+++ b/dwl.c
@@ -720,13 +720,12 @@ commitlayersurfacenotify(struct wl_listener *listener, void *data)
if (layer != layersurface->scene->node.parent) {
wlr_scene_node_reparent(&layersurface->scene->node, layer);
- wlr_scene_node_reparent(&layersurface->popups->node, layer);
wl_list_remove(&layersurface->link);
wl_list_insert(&layersurface->mon->layers[wlr_layer_surface->current.layer],
&layersurface->link);
+ wlr_scene_node_reparent(&layersurface->popups->node, (wlr_layer_surface->current.layer
+ < ZWLR_LAYER_SHELL_V1_LAYER_TOP ? layers[LyrTop] : layer));
}
- if (wlr_layer_surface->current.layer < ZWLR_LAYER_SHELL_V1_LAYER_TOP)
- wlr_scene_node_reparent(&layersurface->popups->node, layers[LyrTop]);
if (wlr_layer_surface->current.committed == 0
&& layersurface->mapped == wlr_layer_surface->surface->mapped)