From ade88c1be7ff64e22f7db86204a68c1f5e73957a Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Tue, 22 Feb 2022 00:50:18 -0500 Subject: [PATCH] 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. --- sway/desktop/output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 9f741203f3..115cfbd539 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -219,11 +219,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);