Exit when main selected seat/output goes away

pixman-rendering
Andri Yngvason 2020-06-12 23:15:22 +00:00
parent 041ac60ef6
commit 4f1bca55c3
1 changed files with 8 additions and 2 deletions

View File

@ -212,7 +212,10 @@ static void registry_remove(void* data, struct wl_registry* registry,
wl_list_remove(&out->link);
output_destroy(out);
/* TODO: If this is the selected output, exit */
if (out == self->selected_output) {
log_error("Selected output went away. Exiting...\n");
wayvnc_exit(self);
}
return;
}
@ -222,7 +225,10 @@ static void registry_remove(void* data, struct wl_registry* registry,
wl_list_remove(&seat->link);
seat_destroy(seat);
/* TODO: If this is the selected seat, exit */
if (seat == self->selected_seat) {
log_error("Selected seat went away. Exiting...\n");
wayvnc_exit(self);
}
return;
}