Skip to content

Commit

Permalink
output: destroy output after ensuring it is disabled
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Nefsen402 committed Feb 27, 2022
1 parent a42281e commit ade88c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sway/desktop/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ade88c1

Please sign in to comment.