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 stop on an assert.
  • Loading branch information
Nefsen402 committed Feb 22, 2022
1 parent 71a5657 commit b4456b0
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 @@ -206,11 +206,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 b4456b0

Please sign in to comment.