Use wl_signal_emit_mutable()

This function fixes segfaults when emitting a signal potentially
removes arbitrary listeners.
This commit is contained in:
Simon Ser 2022-11-10 14:35:14 +01:00 committed by Kirill Primak
parent 6c3b35701d
commit dcd2076f38
5 changed files with 9 additions and 9 deletions

View file

@ -847,7 +847,7 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface,
}
void view_unmap(struct sway_view *view) {
wl_signal_emit(&view->events.unmap, view);
wl_signal_emit_mutable(&view->events.unmap, view);
wl_list_remove(&view->surface_new_subsurface.link);