@@ -53,6 +53,7 @@ FocusScope {
5353 if (surface) {
5454 surfaceContainer.surface = surface;
5555 d.liveSurface = surface.live;
56+ d.surfaceSeenLive = d.liveSurface;
5657 d.hadSurface = false;
5758 surfaceInitTimer.start();
5859 } else {
@@ -70,7 +71,12 @@ FocusScope {
7071 property bool liveSurface: false;
7172 property var con: Connections {
7273 target: root.surface
73− onLiveChanged: d.liveSurface = root.surface.live
74+ onLiveChanged: {
75+ d.liveSurface = root.surface.live;
76+ if (d.liveSurface) {
77+ d.surfaceSeenLive = true;
78+ }
79+ }
7480 }
7581 // using liveSurface instead of root.surface.live because with the latter
7682 // this expression is not reevaluated when root.surface changes
@@ -101,6 +107,7 @@ FocusScope {
101107 // might show the UI accommodating due to surface resizes on startup.
102108 // Remove this when possible
103109 property bool surfaceInitialized: false
110+ property bool surfaceSeenLive: false
104111
105112 readonly property bool supportsSurfaceResize:
106113 application &&
@@ -251,6 +258,7 @@ FocusScope {
251258 name: "splashScreen"
252259 when:
253260 !d.hadSurface && (!root.surface || !d.surfaceInitialized)
261+ && (d.liveSurface || !d.surfaceSeenLive)
254262 &&
255263 screenshotImage.status !== Image.Ready
256264 },
@@ -283,8 +291,9 @@ FocusScope {
283291 when:
284292 // The surface died while the application is running. It must have been closed
285293 // by the shell or the application decided to destroy it by itself
286− root.surface && d.surfaceInitialized && !d.liveSurface
287− && d.applicationState === ApplicationInfoInterface.Running
294+ root.surface && (d.surfaceInitialized || d.surfaceSeenLive) && !d.liveSurface
295+ && (d.applicationState === ApplicationInfoInterface.Running
296+ || d.applicationState === ApplicationInfoInterface.Starting)
288297 }
289298 ]
290299