@@ -53,6 +53,7 @@ FocusScope {
53 if (surface) {
53 if (surface) {
54 surfaceContainer.surface = surface;
54 surfaceContainer.surface = surface;
55 d.liveSurface = surface.live;
55 d.liveSurface = surface.live;
56+ d.surfaceSeenLive = d.liveSurface;
56 d.hadSurface = false;
57 d.hadSurface = false;
57 surfaceInitTimer.start();
58 surfaceInitTimer.start();
@@ -70,7 +71,12 @@ FocusScope {
70 property bool liveSurface: false;
71 property bool liveSurface: false;
71 property var con: Connections {
72 property var con: Connections {
72 target: root.surface
73 target: root.surface
73− onLiveChanged: d.liveSurface = root.surface.live
75+ d.liveSurface = root.surface.live;
77+ d.surfaceSeenLive = true;
75 // using liveSurface instead of root.surface.live because with the latter
81 // using liveSurface instead of root.surface.live because with the latter
76 // this expression is not reevaluated when root.surface changes
82 // this expression is not reevaluated when root.surface changes
@@ -101,6 +107,7 @@ FocusScope {
101 // might show the UI accommodating due to surface resizes on startup.
107 // might show the UI accommodating due to surface resizes on startup.
102 // Remove this when possible
108 // Remove this when possible
103 property bool surfaceInitialized: false
109 property bool surfaceInitialized: false
110+ property bool surfaceSeenLive: false
105 readonly property bool supportsSurfaceResize:
112 readonly property bool supportsSurfaceResize:
106 application &&
113 application &&
@@ -251,6 +258,7 @@ FocusScope {
251 name: "splashScreen"
258 name: "splashScreen"
253 !d.hadSurface && (!root.surface || !d.surfaceInitialized)
260 !d.hadSurface && (!root.surface || !d.surfaceInitialized)
261+ && (d.liveSurface || !d.surfaceSeenLive)
255 screenshotImage.status !== Image.Ready
263 screenshotImage.status !== Image.Ready
@@ -283,8 +291,9 @@ FocusScope {
284 // The surface died while the application is running. It must have been closed
292 // The surface died while the application is running. It must have been closed
285 // by the shell or the application decided to destroy it by itself
293 // by the shell or the application decided to destroy it by itself
286− root.surface && d.surfaceInitialized && !d.liveSurface
294+ root.surface && (d.surfaceInitialized || d.surfaceSeenLive) && !d.liveSurface
287− && d.applicationState === ApplicationInfoInterface.Running
295+ && (d.applicationState === ApplicationInfoInterface.Running
296+ || d.applicationState === ApplicationInfoInterface.Starting)