mirror of
https://github.com/swaywm/sway.git
synced 2026-04-17 06:46:32 -04:00
Use wl_signal_emit_mutable()
This function fixes segfaults when emitting a signal potentially removes arbitrary listeners.
This commit is contained in:
parent
6c3b35701d
commit
dcd2076f38
5 changed files with 9 additions and 9 deletions
|
|
@ -49,7 +49,7 @@ struct sway_container *container_create(struct sway_view *view) {
|
|||
c->outputs = create_list();
|
||||
|
||||
wl_signal_init(&c->events.destroy);
|
||||
wl_signal_emit(&root->events.new_node, &c->node);
|
||||
wl_signal_emit_mutable(&root->events.new_node, &c->node);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
|
@ -104,7 +104,7 @@ void container_begin_destroy(struct sway_container *con) {
|
|||
container_fullscreen_disable(con);
|
||||
}
|
||||
|
||||
wl_signal_emit(&con->node.events.destroy, &con->node);
|
||||
wl_signal_emit_mutable(&con->node.events.destroy, &con->node);
|
||||
|
||||
container_end_mouse_operation(con);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue