From 7a89b074598b97c8500cd8d508098a59729f2154 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Wed, 4 Jan 2023 00:45:26 -0500 Subject: [PATCH] output: destroy global after destroy events This lets the compositor do stuff with the global right before destruction. --- 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 dc2335cd4..16ef0e980 100644 --- a/types/output/output.c +++ b/types/output/output.c @@ -386,12 +386,13 @@ void wlr_output_destroy(struct wlr_output *output) { } wl_list_remove(&output->display_destroy.link); - wlr_output_destroy_global(output); output_clear_back_buffer(output); wl_signal_emit_mutable(&output->events.destroy, output); wlr_addon_set_finish(&output->addons); + wlr_output_destroy_global(output); + // The backend is responsible for free-ing the list of modes struct wlr_output_cursor *cursor, *tmp_cursor;