diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-26 20:14:58 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-26 20:14:58 +1000 |
commit | 93696b78ecbc31ec34be97ec26836efb74d359f0 (patch) | |
tree | 4e39f49907af118e3b288c5e38464eb525e1e18b /sway | |
parent | 834805f5e260bcc77d714323d4a7f4bfd1dbfb17 (diff) | |
download | sway-93696b78ecbc31ec34be97ec26836efb74d359f0.tar.xz |
Fix crash when closing output window from outer session
Emitting the close event needs to happen before
container_output_destroy, because container_output_destroy sets the
sway_output to NULL and sway_output is used in IPC.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/tree/container.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 2f041a36..0c860405 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -304,6 +304,9 @@ struct sway_container *container_destroy_noreaping(struct sway_container *con) { return NULL; } + wl_signal_emit(&con->events.destroy, con); + ipc_event_window(con, "close"); + // The below functions move their children to somewhere else. if (con->type == C_OUTPUT) { container_output_destroy(con); @@ -325,9 +328,6 @@ struct sway_container *container_destroy_noreaping(struct sway_container *con) { } } - wl_signal_emit(&con->events.destroy, con); - ipc_event_window(con, "close"); - con->destroying = true; list_add(server.destroying_containers, con); |