From 5d639394f3e83b01596dcd166a44a9a1a2583350 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Thu, 30 Nov 2023 13:29:18 -0500 Subject: [PATCH] types/output: emit destroy event before destroying global --- types/output/output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/output/output.c b/types/output/output.c index cc8b5e49..a97eae77 100644 --- a/types/output/output.c +++ b/types/output/output.c @@ -439,11 +439,12 @@ void wlr_output_destroy(struct wlr_output *output) { return; } + wl_signal_emit_mutable(&output->events.destroy, output); + wlr_output_destroy_global(output); wl_list_remove(&output->display_destroy.link); - wl_signal_emit_mutable(&output->events.destroy, output); wlr_addon_set_finish(&output->addons); // The backend is responsible for free-ing the list of modes