+static void
+ivi_compositor_destroy_pending_surfaces(struct ivi_compositor *ivi)
+{
+ struct pending_popup *p_popup, *next_p_popup;
+ struct pending_split *split_surf, *next_split_surf;
+ struct pending_fullscreen *fs_surf, *next_fs_surf;
+ struct pending_remote *remote_surf, *next_remote_surf;
+
+ wl_list_for_each_safe(p_popup, next_p_popup,
+ &ivi->popup_pending_apps, link)
+ ivi_remove_pending_desktop_surface_popup(p_popup);
+
+ wl_list_for_each_safe(split_surf, next_split_surf,
+ &ivi->split_pending_apps, link)
+ ivi_remove_pending_desktop_surface_split(split_surf);
+
+ wl_list_for_each_safe(fs_surf, next_fs_surf,
+ &ivi->fullscreen_pending_apps, link)
+ ivi_remove_pending_desktop_surface_fullscreen(fs_surf);
+
+ wl_list_for_each_safe(remote_surf, next_remote_surf,
+ &ivi->remote_pending_apps, link)
+ ivi_remove_pending_desktop_surface_remote(remote_surf);
+}
+
+static void
+shell_desktop_set_app_property_mode(struct wl_client *client,
+ struct wl_resource *shell_res, uint32_t perm)
+{
+ struct desktop_client *dclient = wl_resource_get_user_data(shell_res);
+ if (perm) {
+ dclient->ivi->keep_pending_surfaces = true;
+ } else {
+ dclient->ivi->keep_pending_surfaces = false;
+ /* remove any previous pending surfaces */
+ ivi_compositor_destroy_pending_surfaces(dclient->ivi);
+ }
+}
+