@@ -302,6 +302,7 @@ AbstractStage {
304 name: "sidestagedrightedge"; when: rightEdgeDragArea.dragging && root.mode == "stagedWithSideStage"
304 name: "sidestagedrightedge"; when: rightEdgeDragArea.dragging && root.mode == "stagedWithSideStage"
305+ PropertyChanges { target: priv; nextInStack: priv.sideStageDelegate && priv.sideStageDelegate.itemIndex < 2 ? 2 : 1 }
307 name: "windowedrightedge"; when: rightEdgeDragArea.dragging && root.mode == "windowed"
308 name: "windowedrightedge"; when: rightEdgeDragArea.dragging && root.mode == "windowed"
@@ -312,7 +313,7 @@ AbstractStage {
313 name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage"
314 name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage"
314 PropertyChanges { target: triGestureArea; enabled: true }
315 PropertyChanges { target: triGestureArea; enabled: true }
315− PropertyChanges { target: priv; nextInStack: priv.sideStageDelegate ? 3 : 2 }
316+ PropertyChanges { target: priv; nextInStack: priv.sideStageDelegate && priv.sideStageDelegate.itemIndex < 2 ? 2 : 1 }
316 PropertyChanges { target: sideStage; visible: true }
317 PropertyChanges { target: sideStage; visible: true }
@@ -473,6 +474,7 @@ AbstractStage {
473 delegate: FocusScope {
474 delegate: FocusScope {
474 id: appDelegate
475 id: appDelegate
475 objectName: "appDelegate_" + model.id
476 objectName: "appDelegate_" + model.id
477+ property int itemIndex: index // We need this from outside the repeater
476 // z might be overriden in some cases by effects, but we need z ordering
478 // z might be overriden in some cases by effects, but we need z ordering
477 // to calculate occlusion detection
479 // to calculate occlusion detection
478 property int normalZ: topLevelSurfaceList.count - index
480 property int normalZ: topLevelSurfaceList.count - index
@@ -789,26 +791,13 @@ AbstractStage {
790 StagedRightEdgeMaths {
792 StagedRightEdgeMaths {
791 id: stagedRightEdgeMaths
793 id: stagedRightEdgeMaths
793− sceneWidth: appContainer.width - root.leftMargin
794− sceneHeight: appContainer.height
796− targetHeight: spreadMaths.stackHeight
797− targetX: spreadMaths.targetX
798− startY: appDelegate.fullscreen ? 0 : PanelState.panelHeight
799− targetY: spreadMaths.targetY
800− targetAngle: spreadMaths.targetAngle
801− targetScale: spreadMaths.targetScale
804− SideStagedRightEdgeMaths {
805− id: sideStagedRightEdgeMaths
806 sceneWidth: appContainer.width - root.leftMargin
794 sceneWidth: appContainer.width - root.leftMargin
807 sceneHeight: appContainer.height
795 sceneHeight: appContainer.height
808 isMainStageApp: priv.mainStageDelegate == appDelegate
796 isMainStageApp: priv.mainStageDelegate == appDelegate
809 isSideStageApp: priv.sideStageDelegate == appDelegate
797 isSideStageApp: priv.sideStageDelegate == appDelegate
810 sideStageWidth: sideStage.width
798 sideStageWidth: sideStage.width
811 itemIndex: index
799 itemIndex: index
800+ nextInStack: priv.nextInStack
812 progress: 0
801 progress: 0
813 targetHeight: spreadMaths.stackHeight
802 targetHeight: spreadMaths.stackHeight
814 targetX: spreadMaths.targetX
803 targetX: spreadMaths.targetX
@@ -849,56 +838,29 @@ AbstractStage {
849 PropertyChanges { target: dragArea; enabled: true }
838 PropertyChanges { target: dragArea; enabled: true }
850 PropertyChanges { target: windowInfoItem; opacity: spreadMaths.tileInfoOpacity; visible: spreadMaths.itemVisible }
839 PropertyChanges { target: windowInfoItem; opacity: spreadMaths.tileInfoOpacity; visible: spreadMaths.itemVisible }
853−// name: "stagedrightedge";
854−// when: root.state == "stagedrightedge" || rightEdgeFocusAnimation.running || hidingAnimation.running
856−// target: stagedRightEdgeMaths
857−// progress: rightEdgeDragArea.progress
860−// target: appDelegate
861−// y: stagedRightEdgeMaths.animatedY
862−// x: stagedRightEdgeMaths.animatedX
864−// height: stagedRightEdgeMaths.animatedHeight
865−// requestedWidth: decoratedWindow.oldRequestedWidth
866−// requestedHeight: decoratedWindow.oldRequestedHeight
867−// visible: stagedRightEdgeMaths.itemVisible
870−// target: decoratedWindow;
871−// hasDecoration: false
872−// angle: stagedRightEdgeMaths.animatedAngle
873−// itemScale: stagedRightEdgeMaths.animatedScale
874−// scaleToPreviewSize: spreadItem.stackHeight
875−// scaleToPreviewProgress: stagedRightEdgeMaths.scaleToPreviewProgress
876−// shadowOpacity: 0.3
880− name: "sidestagedrightedge"
842+ name: "stagedrightedge"
881 when: root.state == "sidestagedrightedge" || root.state == "stagedrightedge" || rightEdgeFocusAnimation.running || hidingAnimation.running
843 when: root.state == "sidestagedrightedge" || root.state == "stagedrightedge" || rightEdgeFocusAnimation.running || hidingAnimation.running
882 PropertyChanges {
844 PropertyChanges {
883− target: sideStagedRightEdgeMaths
845+ target: stagedRightEdgeMaths
884 progress: rightEdgeDragArea.progress
846 progress: rightEdgeDragArea.progress
886 PropertyChanges {
848 PropertyChanges {
887 target: appDelegate
849 target: appDelegate
888− x: sideStagedRightEdgeMaths.animatedX
850+ x: stagedRightEdgeMaths.animatedX
889− y: sideStagedRightEdgeMaths.animatedY
851+ y: stagedRightEdgeMaths.animatedY
890 z: index +1
852 z: index +1
891− height: sideStagedRightEdgeMaths.animatedHeight
853+ height: stagedRightEdgeMaths.animatedHeight
892 requestedWidth: decoratedWindow.oldRequestedWidth
854 requestedWidth: decoratedWindow.oldRequestedWidth
893 requestedHeight: decoratedWindow.oldRequestedHeight
855 requestedHeight: decoratedWindow.oldRequestedHeight
895 PropertyChanges {
857 PropertyChanges {
896 target: decoratedWindow
858 target: decoratedWindow
897 hasDecoration: false
859 hasDecoration: false
898− angle: sideStagedRightEdgeMaths.animatedAngle
860+ angle: stagedRightEdgeMaths.animatedAngle
899− itemScale: sideStagedRightEdgeMaths.animatedScale
861+ itemScale: stagedRightEdgeMaths.animatedScale
900 scaleToPreviewSize: spreadItem.stackHeight
862 scaleToPreviewSize: spreadItem.stackHeight
901− scaleToPreviewProgress: sideStagedRightEdgeMaths.scaleToPreviewProgress
863+ scaleToPreviewProgress: stagedRightEdgeMaths.scaleToPreviewProgress
902 shadowOpacity: .3
864 shadowOpacity: .3
@@ -1345,8 +1307,9 @@ AbstractStage {
1345 priv.goneToSpread = true;
1307 priv.goneToSpread = true;
1346 } else {
1308 } else {
1347 if (appRepeater.count > 1) {
1309 if (appRepeater.count > 1) {
1310+ print("playing focus animation for", priv.nextInStack)
1348 appRepeater.itemAt(0).playHidingAnimation()
1311 appRepeater.itemAt(0).playHidingAnimation()
1349− appRepeater.itemAt(1).playFocusAnimation()
1312+ appRepeater.itemAt(priv.nextInStack).playFocusAnimation()
1350 } else {
1313 } else {
1351 appRepeater.itemAt(0).playFocusAnimation();
1314 appRepeater.itemAt(0).playFocusAnimation();