@@ -68,7 +68,7 @@ FocusScope {
6868 spreadDelegate: root
6969 background: background
7070 window: appWindowWithShadow
71− screenshot: appWindowScreenshot
71+ screenshot: appWindowScreenshotWithShadow
7272 }
7373
7474 QtObject {
@@ -110,6 +110,8 @@ FocusScope {
110110 property real transformOriginX
111111 property real transformOriginY
112112
113+ property var window: appWindow
114+
113115 transform: Rotation {
114116 origin.x: appWindowWithShadow.transformOriginX
115117 origin.y: appWindowWithShadow.transformOriginY
@@ -267,9 +269,10 @@ FocusScope {
267269 }
268270 }
269271
270− Image {
271− id: appWindowScreenshot
272− source: ""
272+ Item {
273+ // mimics appWindowWithShadow. Do the positioning of screenshots of non-fullscreen
274+ // app windows
275+ id: appWindowScreenshotWithShadow
273276 visible: false
274277
275278 property real transformRotationAngle: 0
@@ -277,21 +280,33 @@ FocusScope {
277280 property real transformOriginY
278281
279282 transform: Rotation {
280− origin.x: appWindowScreenshot.transformOriginX
281− origin.y: appWindowScreenshot.transformOriginY
283+ origin.x: appWindowScreenshotWithShadow.transformOriginX
284+ origin.y: appWindowScreenshotWithShadow.transformOriginY
282285 axis { x: 0; y: 0; z: 1 }
283− angle: appWindowScreenshot.transformRotationAngle
286+ angle: appWindowScreenshotWithShadow.transformRotationAngle
284287 }
285288
289+ property var window: appWindowScreenshot
290+
286291 function take() {
287292 // Format: "image://application/$APP_ID/$CURRENT_TIME_MS"
288293 // eg: "image://application/calculator-app/123456"
289294 var timeMs = new Date().getTime();
290− source = "image://application/" + root.application.appId + "/" + timeMs;
295+ appWindowScreenshot.source = "image://application/" + root.application.appId + "/" + timeMs;
296+ }
297+ function discard() {
298+ appWindowScreenshot.source = "";
291299 }
292300
293− sourceSize.width: width
294− sourceSize.height: height
301+ Image {
302+ id: appWindowScreenshot
303+ source: ""
304+
305+ anchors.fill: parent
306+
307+ sourceSize.width: width
308+ sourceSize.height: height
309+ }
295310 }
296311
297312 DraggingArea {