aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2022-11-10 14:35:14 +0100
committerLibravatar Kirill Primak <vyivel@eclair.cafe>2022-11-10 22:27:38 +0300
commitdcd2076f3854f4bb0018b6a47781dc48a55393b0 (patch)
tree220eb2a4a3861a62b5c1afc9e73216cef9bf7024 /sway/tree/view.c
parentci: install hwdata (diff)
downloadsway-dcd2076f3854f4bb0018b6a47781dc48a55393b0.tar.gz
sway-dcd2076f3854f4bb0018b6a47781dc48a55393b0.tar.zst
sway-dcd2076f3854f4bb0018b6a47781dc48a55393b0.zip
Use wl_signal_emit_mutable()
This function fixes segfaults when emitting a signal potentially removes arbitrary listeners.
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 0004ed14..589a3f7e 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -847,7 +847,7 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface,
847} 847}
848 848
849void view_unmap(struct sway_view *view) { 849void view_unmap(struct sway_view *view) {
850 wl_signal_emit(&view->events.unmap, view); 850 wl_signal_emit_mutable(&view->events.unmap, view);
851 851
852 wl_list_remove(&view->surface_new_subsurface.link); 852 wl_list_remove(&view->surface_new_subsurface.link);
853 853