diff --git a/sway/tree/container.c b/sway/tree/container.c index bf7085cbd..ee9c89ffd 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -104,8 +104,6 @@ void container_begin_destroy(struct sway_container *con) { container_fullscreen_disable(con); } - wl_signal_emit(&con->node.events.destroy, &con->node); - container_end_mouse_operation(con); con->node.destroying = true; diff --git a/sway/tree/view.c b/sway/tree/view.c index 0004ed141..baa31f214 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -891,6 +891,7 @@ void view_unmap(struct sway_view *view) { seat_consider_warp_to_focus(seat); } + wl_signal_emit(&view->container->node.events.destroy, &view->container->node); transaction_commit_dirty(); view->surface = NULL; }