@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2015 Canonical, Ltd.
2+ * Copyright (C) 2015-2016 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -30,8 +30,7 @@ SequentialAnimation {
3030
3131 ScriptAction { script: {
3232 info.transitioning = true;
33− windowScreenshot.take();
34− windowScreenshot.visible = true;
33+
3534 shell.orientationAngle = root.toAngle;
3635 shell.x = 0;
3736 shell.width = flipShellDimensions ? orientedShell.height : orientedShell.width;
@@ -41,12 +40,10 @@ SequentialAnimation {
4140 shell.updateFocusedAppOrientation();
4241 shellCover.visible = true;
4342
44− windowScreenshot.transformOriginX = orientedShell.width / 2;
45− if (fromAngle == 180 || fromAngle == 270) {
46− windowScreenshot.transformOriginY = orientedShell.height - (orientedShell.width / 2);
47− } else {
48− windowScreenshot.transformOriginY = orientedShell.width / 2;
49− }
43+ shellSnapshot.transformOriginX = shell.transformOriginX;
44+ shellSnapshot.transformOriginY = shell.transformOriginY;
45+ shellSnapshot.transformRotationAngle = shell.transformRotationAngle;
46+ shellSnapshot.visible = true;
5047 } }
5148 ParallelAnimation {
5249 NumberAnimation {
@@ -66,24 +63,24 @@ SequentialAnimation {
6663 }
6764
6865 NumberAnimation {
69− target: windowScreenshot; property: "opacity"; from: 1; to: 0;
66+ target: shellSnapshot; property: "opacity"; from: 1; to: 0;
7067 duration: rotationDuration; easing.type: rotationEasing
7168 }
7269 RotationAnimation {
73− target: windowScreenshot; property: "transformRotationAngle";
74− from: 0; to: root.toAngle - root.fromAngle
70+ target: shellSnapshot; property: "transformRotationAngle";
71+ from: root.fromAngle; to: root.toAngle
7572 direction: RotationAnimation.Shortest
7673 duration: rotationDuration; easing.type: rotationEasing
7774 }
7875 NumberAnimation {
79− target: windowScreenshot; property: "y"
80− from: 0; to: root.toY - root.fromY
76+ target: shellSnapshot; property: "y"
77+ from: root.fromY; to: root.toY
8178 duration: rotationDuration; easing.type: rotationEasing
8279 }
8380 }
8481 ScriptAction { script: {
85− windowScreenshot.visible = false;
86− windowScreenshot.discard();
82+ shellSnapshot.visible = false;
83+ shellSnapshot.discard();
8784 shellCover.visible = false;
8885 info.transitioning = false;
8986 } }