on xenial help sign in
[spread] avoid changing sourceSize of snapshotted apps, it causes ghost apps in the spread
c00854dGerry Boland
qml/Stages/ApplicationWindow.qml+5−4
@@ -94,15 +94,16 @@ FocusScope {
94 antialiasing: !root.interactive
94 antialiasing: !root.interactive
95
95
96 function take() {
96 function take() {
97+ // Save memory by using a half-resolution (thus quarter size) screenshot.
98+ // Do not make this a binding, we can only take the screenshot once!
99+ sourceSize.width = root.width / 2;
100+ sourceSize.height = root.height / 2;
101+
97 // Format: "image://application/$APP_ID/$CURRENT_TIME_MS"
102 // Format: "image://application/$APP_ID/$CURRENT_TIME_MS"
98 // eg: "image://application/calculator-app/123456"
103 // eg: "image://application/calculator-app/123456"
99 var timeMs = new Date().getTime();
104 var timeMs = new Date().getTime();
100 source = "image://application/" + root.application.appId + "/" + timeMs;
105 source = "image://application/" + root.application.appId + "/" + timeMs;
101 }
106 }
102−
103− // Save memory by using a half-resolution (thus quarter size) screenshot
104− sourceSize.width: root.width / 2
105− sourceSize.height: root.height / 2
106 }
107 }
107
108
108 Loader {
109 Loader {