aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 3ae97e66..68f095c0 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -754,18 +754,22 @@ static void update_output_manager_config(struct sway_server *server) {
754static void handle_destroy(struct wl_listener *listener, void *data) { 754static void handle_destroy(struct wl_listener *listener, void *data) {
755 struct sway_output *output = wl_container_of(listener, output, destroy); 755 struct sway_output *output = wl_container_of(listener, output, destroy);
756 struct sway_server *server = output->server; 756 struct sway_server *server = output->server;
757 wl_signal_emit(&output->events.destroy, output); 757 output_begin_destroy(output);
758 758
759 if (output->enabled) { 759 if (output->enabled) {
760 output_disable(output); 760 output_disable(output);
761 } 761 }
762 output_begin_destroy(output); 762
763 wl_list_remove(&output->link);
763 764
764 wl_list_remove(&output->destroy.link); 765 wl_list_remove(&output->destroy.link);
765 wl_list_remove(&output->commit.link); 766 wl_list_remove(&output->commit.link);
766 wl_list_remove(&output->mode.link); 767 wl_list_remove(&output->mode.link);
767 wl_list_remove(&output->present.link); 768 wl_list_remove(&output->present.link);
768 769
770 output->wlr_output->data = NULL;
771 output->wlr_output = NULL;
772
769 transaction_commit_dirty(); 773 transaction_commit_dirty();
770 774
771 update_output_manager_config(server); 775 update_output_manager_config(server);