Clear head output when the output is destroyed

This commit is contained in:
Mars-Wave
2026-04-03 19:19:29 +02:00
parent 4c7342b5c5
commit 4ef6948efc
+6
View File
@@ -310,6 +310,12 @@ static void wd_output_destroy(struct wd_output *output) {
if (output->state->layer_shell != NULL) {
wd_destroy_overlay(output);
}
struct wd_head *head;
wl_list_for_each(head, &output->state->heads, link) {
if (head->output == output) {
head->output = NULL;
}
}
zxdg_output_v1_destroy(output->xdg_output);
free(output->name);
free(output);