sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 8a8c78deacd388dabbe82a4a5055458494cd6258
parent 7733bf9963d6a18df548164642e6637c2e71f1f1
Author: llyyr <llyyr.public@gmail.com>
Date:   Wed, 16 Apr 2025 17:32:47 +0530

layer_shell: destroy layer_surface on assigned output destruction

According to the spec, the closed event should be sent when the surface
is no longer shown, because the output may have been destroyed or the
user may have asked for it to be removed. In such cases, the clients
should destroy the resource.

This fixes mako not being able to show notifications if the assigned
output was destroyed while a notificataion was still visible

Fixes: 188811f80861 ("scene_graph: Port layer_shell")

Diffstat:
Msway/desktop/layer_shell.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c @@ -221,7 +221,7 @@ static void handle_output_destroy(struct wl_listener *listener, void *data) { wl_container_of(listener, layer, output_destroy); layer->output = NULL; - wlr_scene_node_destroy(&layer->scene->tree->node); + wlr_layer_surface_v1_destroy(layer->layer_surface); } static void handle_node_destroy(struct wl_listener *listener, void *data) {