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