@@ -121,15 +121,12 @@ FocusScope {
122 property bool surfaceOldEnoughToBeResized: false
122 property bool surfaceOldEnoughToBeResized: false
124− property var focusedSurface: {
125− if (promptSurfacesRepeater.count == 0) {
124+ property Item focusedSurface: promptSurfacesRepeater.count === 0 ? surfaceContainer
126− return surfaceContainer;
128− return promptSurfacesRepeater.itemAt(promptSurfacesRepeater.count - 1);
125+ : promptSurfacesRepeater.first
131 onFocusedSurfaceChanged: {
126 onFocusedSurfaceChanged: {
127+ if (focusedSurface) {
132− focusedSurface.focus = true;
128+ focusedSurface.focus = true;
@@ -158,6 +155,7 @@ FocusScope {
158 objectName: "screenshotImage"
155 objectName: "screenshotImage"
159 anchors.fill: parent
156 anchors.fill: parent
160 antialiasing: !root.interactive
157 antialiasing: !root.interactive
162 function take() {
160 function take() {
163 // Save memory by using a half-resolution (thus quarter size) screenshot.
161 // Save memory by using a half-resolution (thus quarter size) screenshot.
@@ -175,6 +173,7 @@ FocusScope {
175 visible: active
173 visible: active
176 active: false
174 active: false
177 anchors.fill: parent
175 anchors.fill: parent
176+ z: screenshotImage.z + 1
178 sourceComponent: Component {
177 sourceComponent: Component {
180 id: splash
179 id: splash
@@ -191,6 +190,7 @@ FocusScope {
192 SurfaceContainer {
191 SurfaceContainer {
193 id: surfaceContainer
192 id: surfaceContainer
193+ z: splashLoader.z + 1
194 requestedWidth: root.requestedWidth
194 requestedWidth: root.requestedWidth
195 requestedHeight: root.requestedHeight
195 requestedHeight: root.requestedHeight
196 surfaceOrientationAngle: application && application.rotatesWindowContents ? root.surfaceOrientationAngle : 0
196 surfaceOrientationAngle: application && application.rotatesWindowContents ? root.surfaceOrientationAngle : 0
@@ -208,12 +208,28 @@ FocusScope {
210 delegate: SurfaceContainer {
210 delegate: SurfaceContainer {
211+ id: promptSurfaceContainer
211− interactive: index == (promptSurfacesRepeater.count - 1) && root.interactive
212+ interactive: index === 0 && root.interactive
212 surface: model.surface
213 surface: model.surface
213 width: root.width
214 width: root.width
214 height: root.height
215 height: root.height
215 isPromptSurface: true
216 isPromptSurface: true
217+ z: surfaceContainer.z + (promptSurfacesRepeater.count - index)
218+ property int index: model.index
219+ onIndexChanged: updateFirst()
220+ Component.onCompleted: updateFirst()
221+ function updateFirst() {
223+ promptSurfacesRepeater.first = promptSurfaceContainer;
232+ property Item first: null
219 // SurfaceContainer size drives ApplicationWindow size
235 // SurfaceContainer size drives ApplicationWindow size