compositor: Unmap views moved to layers outside of the scene graph
commit 5fe02dc6 partially resolved the issue in #937 (closed) by bringing back the old band-aid solution for layer moves. However, since the events of commit bf228370 and following commits we have a problem with subsurfaces leaving garbage behind when minimized - see #366 (closed) which was probably fixed for a while then became broken again.
When we minimize a view that has subsurfaces, by moving it to a layer outside of the scene graph, we need to be sure to handle the subsurface views - which follow their parent's layer instead of having weston_view_move_to_layer() explicitly called.
Do this by assuming layers with an empty link are not part of the scene graph and unmapping views when they're moved to these layers. This will recursively unmap the subsurface views.
We can now remove the band-aid paint node destroy, as the unmap process will destroy paint nodes as appropriate.
Fixes 5fe02dc6
Fixes #937 (closed)
Fixes #366 (closed)
Signed-off-by: Derek Foreman derek.foreman@collabora.com