kiosk-shell: Convert to wl_signal_emit_mutable

And add a missing handler removal in kiosk-shell-grab.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2025-04-18 15:09:30 +03:00
parent 2e2da0c950
commit df4b2d876e
2 changed files with 4 additions and 2 deletions

View file

@ -208,6 +208,8 @@ kiosk_shell_grab_handle_shsurf_destroy(struct wl_listener *listener, void *data)
container_of(listener, struct kiosk_shell_grab,
shsurf_destroy_listener);
wl_list_remove(&shgrab->shsurf_destroy_listener.link);
shgrab->shsurf = NULL;
}

View file

@ -453,7 +453,7 @@ kiosk_shell_surface_reconfigure_for_output(struct kiosk_shell_surface *shsurf)
static void
kiosk_shell_surface_destroy(struct kiosk_shell_surface *shsurf)
{
wl_signal_emit(&shsurf->destroy_signal, shsurf);
wl_signal_emit_mutable(&shsurf->destroy_signal, shsurf);
wl_list_remove(&shsurf->surface_tree_link);
weston_desktop_surface_set_user_data(shsurf->desktop_surface, NULL);
@ -931,7 +931,7 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface,
/* Inform children about destruction of their parent, so that we can
* reparent them and potentially relink surface tree links before
* finding a focus successor and activating a new surface. */
wl_signal_emit(&shsurf->parent_destroy_signal, shsurf);
wl_signal_emit_mutable(&shsurf->parent_destroy_signal, shsurf);
/* We need to take into account that the surface being destroyed it not
* always the same as the focused surface, which could result in picking