output: destroy output after ensuring it is disabled

This became necessary after the removal of the wlr_output_damage object.
Before, the wlr_output_damage destroy signal fired disabling the output,
then after the handle_destroy function would be called.

Fix this to prevent hitting an assert.
This commit is contained in:
Alexander Orzechowski 2022-02-22 00:50:18 -05:00 committed by Kirill Primak
parent 625cf6df3b
commit d1417b8a13

View file

@ -286,11 +286,12 @@ static void update_output_manager_config(struct sway_server *server) {
static void handle_destroy(struct wl_listener *listener, void *data) {
struct sway_output *output = wl_container_of(listener, output, destroy);
struct sway_server *server = output->server;
output_begin_destroy(output);
if (output->enabled) {
output_disable(output);
}
output_begin_destroy(output);
wl_list_remove(&output->link);