ivi-shell: unmap views which are not in scenegraph
From Michael Olbrich: "Both the core in weston_compositor_build_view_list() with view.link and the ivi-shell in commit_screen_list() with view.layer_link don't remove the old views from the list.
As a result, all views that are not currently in the list have old broken links. Destroying such a view tries to remove the view from these lists and will access the old, invalid pointers."
Therefore, we have to unmap weston_views which are not in current scenegraph of ivi-shell. I implemented ivi_view_is_mapped() function to check mappedness of ivi_views. The functions checks:
- the view is on a layer's order list
- the layer is on a screen
- the layer and view's ivi_surface are visible
If ivi_view is not mapped but weston_view is still mapped, we have to unmap the weston_view with weston_view_unmap() call.
Reported-by: Michael Olbrich m.olbrich@pengutronix.de Signed-off-by: Emre Ucan eucan@de.adit-jv.com