Closed NotKit closed 2 years ago
Please, do not forget to add this to a project board so it does not slip QA and release notes, and also, please create an issue to link the MR to next time.
Also please add test instructions for QA team.
(as asked above) How can we test this?
@NotKit please give some QA instructions, we need to test this for OTA-20.
From Nikita: Hi. This was basically a fix for Waydroid leaving empty window after the session had been started, clicking which would crash the compositor - so someone with Waydroid should test this.
There was three windows on OTA-19 when starting Waydroid - window with android, window with Unity8 label and window with Waydroid logo. Now there are only two, the one with Unity8 label is "missing", so I think it's fixed.
When surface is destroyed by application, SurfaceManager won't destroy it immediately if it is displayed. liveChanged(false) signal is propagaded instead all the way up to ApplicationWindow.qml and TopLevelWindowModel. TopLevelWindowModel may set removeOnceSurfaceDestroyed = true to remove the window in onSurfaceDestroyed handler. However it won't get fired until ApplicationWindow unreferences surface in surfaceContainer.
ApplicationWindow has a surfaceInitialized variable hack which is set by a timer after 100ms the surface is live. So if a surface is destroyed faster than that, it never sets the variable and does not reach "closed" state which unreferences the surface.
Attempt to fix that by introducing one more "surfaceSeenLive" variable that is set once surface becomes live and helps to understand if it appeared but died too quickly.