wl_list_for_each_safe(surface, tmp, &ivi->pending_surfaces, link) {
wl_list_remove(&surface->link);
ivi_check_pending_desktop_surface(surface);
wl_list_for_each_safe(surface, tmp, &ivi->pending_surfaces, link) {
wl_list_remove(&surface->link);
ivi_check_pending_desktop_surface(surface);