+ // Do not hold on to a dead surface so that it can be destroyed.
+ surface: root.surface && root.surface.live ? root.surface : null
Could you add a FIXME here, as I think it should not be QML's job to release the MirSurface if its backing surface goes away. Instead backing MirSurface should go away but the MirSurfaceItem can live on with the last drawn frame and properties.
+ // Do not hold on to a dead surface so that it can be destroyed.
+ surface: root.surface && root.surface.live ? root.surface : null
Could you add a FIXME here, as I think it should not be QML's job to release the MirSurface if its backing surface goes away. Instead backing MirSurface should go away but the MirSurfaceItem can live on with the last drawn frame and properties.