layout: Migrate the layout save/restore to a more useful place
[src/agl-compositor.git] / src / desktop.c
index 8554b06..d5b0be9 100644 (file)
 
 #include "agl-shell-desktop-server-protocol.h"
 
+static void
+ivi_layout_destroy_saved_outputs(struct ivi_compositor *ivi)
+{
+       struct ivi_output *output, *output_next;
+
+       wl_list_for_each_safe(output, output_next, &ivi->saved_outputs, link) {
+               free(output->app_ids);
+               free(output->name);
+
+               wl_list_remove(&output->link);
+               free(output);
+       }
+}
+
 static void
 desktop_advertise_app(struct wl_listener *listener, void *data)
 {
@@ -318,7 +332,7 @@ desktop_surface_removed(struct weston_desktop_surface *dsurface, void *userdata)
                output->active->view->is_mapped = false;
                output->active->view->surface->is_mapped = false;
 
-               weston_layer_entry_remove(&output->active->view->layer_link);
+               weston_view_move_to_layer(output->active->view, NULL);
                output->active = NULL;
        }