diff options
author | Simon Ser <contact@emersion.fr> | 2022-11-10 14:35:14 +0100 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-11-10 22:27:38 +0300 |
commit | dcd2076f3854f4bb0018b6a47781dc48a55393b0 (patch) | |
tree | 220eb2a4a3861a62b5c1afc9e73216cef9bf7024 /sway/tree/view.c | |
parent | ci: install hwdata (diff) | |
download | sway-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.c | 2 |
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 | ||
849 | void view_unmap(struct sway_view *view) { | 849 | void 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 | ||