@@ -53,18 +53,18 @@ FocusScope {
5353 property real leftEdgeDragProgress: 0
5454
5555 // Used by the tutorial code
56− readonly property bool spreadShown: state == "spread"
5756 readonly property real rightEdgeDragProgress: rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0 // How far left the stage has been dragged
5857
5958 // used by the snap windows (edge maximize) feature
6059 readonly property alias previewRectangle: fakeRectangle
6160
61+ readonly property bool spreadShown: state == "spread"
6262 readonly property var mainApp: priv.focusedAppDelegate ? priv.focusedAppDelegate.application : null
6363
6464 // application windows never rotate independently
6565 property int mainAppWindowOrientationAngle: shellOrientationAngle
6666
67− property bool orientationChangesEnabled: priv.focusedAppDelegate && priv.focusedAppDelegate.orientationChangesEnabled
67+ property bool orientationChangesEnabled: !priv.focusedAppDelegate || priv.focusedAppDelegate.orientationChangesEnabled
6868
6969 property int supportedOrientations: {
7070 if (mainApp) {
@@ -105,9 +105,13 @@ FocusScope {
105105 edgeBarrier.push(amount);
106106 }
107107
108+ function closeSpread() {
109+ priv.goneToSpread = false;
110+ }
111+
108112 onSpreadEnabledChanged: {
109− if (!spreadEnabled && root.state == "spread") {
110− priv.goneToSpread = false;
113+ if (!spreadEnabled && spreadShown) {
114+ closeSpread();
111115 }
112116 }
113117
@@ -481,7 +485,7 @@ FocusScope {
481485 }
482486 },
483487 Transition {
484− to: "stagedRightEdge"
488+ to: "stagedRightEdge,sideStagedRightEdge"
485489 PropertyAction { target: floatingFlickable; property: "contentX"; value: 0 }
486490 },
487491 Transition {
@@ -1078,6 +1082,7 @@ FocusScope {
10781082 showHighlight: spreadItem.highlightedIndex === index
10791083 darkening: spreadItem.highlightedIndex >= 0
10801084 anchors.topMargin: dragArea.distance
1085+ interactive: false
10811086 }
10821087 PropertyChanges {
10831088 target: appDelegate
@@ -1117,7 +1122,10 @@ FocusScope {
11171122 scaleToPreviewSize: spreadItem.stackHeight
11181123 scaleToPreviewProgress: stagedRightEdgeMaths.scaleToPreviewProgress
11191124 shadowOpacity: .3
1125+ interactive: false
11201126 }
1127+ // make sure it's visible but transparent so it fades in when we transition to spread
1128+ PropertyChanges { target: windowInfoItem; opacity: 0; visible: true }
11211129 },
11221130 State {
11231131 name: "windowedRightEdge"
@@ -1376,6 +1384,7 @@ FocusScope {
13761384 PropertyAction { target: decoratedWindow; property: "scaleToPreviewSize" }
13771385 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
13781386 UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle,scaleToPreviewProgress"; duration: priv.animationDuration }
1387+ UbuntuNumberAnimation { target: windowInfoItem; properties: "opacity"; duration: priv.animationDuration }
13791388 },
13801389 Transition {
13811390 from: "normal,staged"; to: "stagedWithSideStage"
@@ -1588,7 +1597,7 @@ FocusScope {
15881597 maxWidth: {
15891598 var nextApp = appRepeater.itemAt(index + 1);
15901599 if (nextApp) {
1591− return nextApp.x - appDelegate.x - units.gu(1)
1600+ return Math.max(iconHeight, nextApp.x - appDelegate.x - units.gu(1))
15921601 }
15931602 return appDelegate.width;
15941603 }