@@ -129,7 +129,7 @@ AbstractStage {
129129 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
130130
131131 property bool goneToSpread: false
132− property int animationDuration: /*UbuntuAnimation.FastDuration//*/ 4000//UbuntuAnimation.SleepyDuration
132+ property int animationDuration: UbuntuAnimation.FastDuration //4000//UbuntuAnimation.SleepyDuration
133133
134134 function updateForegroundMaximizedApp() {
135135 var found = false;
@@ -314,12 +314,6 @@ AbstractStage {
314314 ]
315315 onStateChanged: print("spread going to state:", state)
316316
317− Spread {
318− id: spreadItem
319− anchors.fill: appContainer
320− totalItemCount: appRepeater.count
321− z: 10
322− }
323317
324318 FocusScope {
325319 id: appContainer
@@ -335,6 +329,13 @@ AbstractStage {
335329 fillMode: Image.PreserveAspectCrop
336330 }
337331
332+ Spread {
333+ id: spreadItem
334+ anchors.fill: appContainer
335+ totalItemCount: appRepeater.count
336+ z: 10
337+ }
338+
338339 Connections {
339340 target: root.topLevelSurfaceList
340341 onListChanged: priv.updateMainAndSideStageIndexes()
@@ -734,6 +735,7 @@ AbstractStage {
734735 itemScale: spreadMaths.scale
735736 scaleToPreviewSize: spreadItem.stackHeight
736737 scaleToPreview: true
738+ hasDecoration: root.mode === "windowed"
737739 }
738740 PropertyChanges {
739741 target: appDelegate
@@ -907,6 +909,12 @@ AbstractStage {
907909 PropertyAction { target: appDelegate; properties: "visuallyMinimized,visuallyMaximized" }
908910 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
909911 },
912+ Transition {
913+ from: "spread"; to: "staged,normal"
914+// UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
915+// UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle"; duration: priv.animationDuration }
916+ ScriptAction { script: if (appDelegate.focus) appDelegate.playFocusAnimation() }
917+ },
910918 Transition {
911919 to: "minimized"
912920 enabled: appDelegate.animationsEnabled
@@ -946,11 +954,6 @@ AbstractStage {
946954 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
947955 UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle"; duration: priv.animationDuration }
948956 },
949− Transition {
950− from: "spread"; to: "staged,normal"
951− UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
952− UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle"; duration: priv.animationDuration }
953− },
954957 Transition {
955958 from: "normal,staged"; to: "stagedWithSideStage"
956959 UbuntuNumberAnimation { target: appDelegate; properties: "x,y"; duration: priv.animationDuration }
@@ -1303,13 +1306,4 @@ AbstractStage {
13031306 }
13041307 }
13051308 }
1306−
1307− Label {
1308− anchors { left: parent.left; top: parent.top; margins: units.gu(4) }
1309− text: "spreadWidth: " + spreadItem.spreadWidth
1310− + "\n spreadItemWidth: " + spreadItem.spreadItemWidth
1311− + "\n flickableContentWidth: " + floatingFlickable.contentWidth
1312− + "\n visibleItemCount: " + spreadItem.visibleItemCount
1313− + "\n contentTopMargin: " + spreadItem.contentTopMargin
1314− }
13151309}