backend/drm: Destroy page flips on backend destroy

When we destroy the backend, page flips will no longer be invoked meaning
those won't clean up the page flips for us.
This commit is contained in:
Alexander Orzechowski 2023-11-17 14:34:32 -05:00
parent 3aed24b8d4
commit b06d58fa8b
3 changed files with 9 additions and 3 deletions

View file

@ -39,6 +39,11 @@ static void backend_destroy(struct wlr_backend *backend) {
destroy_drm_connector(conn);
}
struct wlr_drm_page_flip *page_flip, *page_flip_tmp;
wl_list_for_each_safe(page_flip, page_flip_tmp, &drm->page_flips, link) {
drm_page_flip_destroy(page_flip);
}
wlr_backend_finish(backend);
wl_list_remove(&drm->display_destroy.link);