- weston_view_update_transform(surface->bg.view);
- weston_view_schedule_repaint(surface->bg.view);
-
- wsurface->is_mapped = true;
-}
-
-static void
-panel_committed(struct ivi_surface *surface)
-{
- struct ivi_compositor *ivi = surface->ivi;
- struct ivi_output *output = surface->bg.output;
- struct weston_output *woutput = output->output;
- struct weston_desktop_surface *dsurface = surface->dsurface;
- struct weston_surface *wsurface =
- weston_desktop_surface_get_surface(dsurface);
- struct weston_geometry geom;
- int32_t x = woutput->x;
- int32_t y = woutput->y;
-
- if (wsurface->is_mapped)
- return;
-
- surface->panel.view = weston_desktop_surface_create_view(dsurface);
-
- geom = weston_desktop_surface_get_geometry(dsurface);
- switch (surface->panel.edge) {
- case AGL_SHELL_EDGE_TOP:
- /* Do nothing */
- break;
- case AGL_SHELL_EDGE_BOTTOM:
- y += woutput->height - geom.height;
- break;
- case AGL_SHELL_EDGE_LEFT:
- /* Do nothing */
- break;
- case AGL_SHELL_EDGE_RIGHT:
- x += woutput->width - geom.width;
- break;
+ weston_layer_entry_remove(&output->active->view->layer_link);
+ output->active = NULL;
+ }
+ if (weston_surface_is_mapped(wsurface)) {
+ weston_desktop_surface_unlink_view(surface->view);
+ weston_view_destroy(surface->view);