output: destroy global after destroy events

This lets the compositor do stuff with the global right before destruction.
This commit is contained in:
Alexander Orzechowski 2023-01-04 00:45:26 -05:00
parent e93ecc669c
commit 7a89b07459

View file

@ -386,12 +386,13 @@ void wlr_output_destroy(struct wlr_output *output) {
} }
wl_list_remove(&output->display_destroy.link); wl_list_remove(&output->display_destroy.link);
wlr_output_destroy_global(output);
output_clear_back_buffer(output); output_clear_back_buffer(output);
wl_signal_emit_mutable(&output->events.destroy, output); wl_signal_emit_mutable(&output->events.destroy, output);
wlr_addon_set_finish(&output->addons); wlr_addon_set_finish(&output->addons);
wlr_output_destroy_global(output);
// The backend is responsible for free-ing the list of modes // The backend is responsible for free-ing the list of modes
struct wlr_output_cursor *cursor, *tmp_cursor; struct wlr_output_cursor *cursor, *tmp_cursor;