@@ -300,6 +300,9 @@ AbstractStage {
300300 State {
301301 name: "stagedrightedge"; when: rightEdgeDragArea.dragging && root.mode == "staged"
302302 },
303+ State {
304+ name: "sidestagedrightedge"; when: rightEdgeDragArea.dragging && root.mode == "stagedWithSideStage"
305+ },
303306 State {
304307 name: "windowedrightedge"; when: rightEdgeDragArea.dragging && root.mode == "windowed"
305308 },
@@ -728,7 +731,8 @@ AbstractStage {
728731 }
729732
730733 function playFocusAnimation() {
731− if (state == "stagedrightedge") {
734+ if (state == "stagedrightedge" || state == "sidestagedrightedge") {
735+ rightEdgeFocusAnimation.targetX = appDelegate.stage == ApplicationInfoInterface.SideStage ? sideStage.x : 0
732736 rightEdgeFocusAnimation.start()
733737 } else {
734738 focusAnimation.start()
@@ -748,7 +752,8 @@ AbstractStage {
748752 }
749753 ParallelAnimation {
750754 id: rightEdgeFocusAnimation
751− UbuntuNumberAnimation { target: appDelegate; properties: "x"; to: 0; duration: priv.animationDuration }
755+ property int targetX: 0
756+ UbuntuNumberAnimation { target: appDelegate; properties: "x"; to: targetX; duration: priv.animationDuration }
752757 UbuntuNumberAnimation { target: decoratedWindow; properties: "angle"; to: 0; duration: priv.animationDuration }
753758 UbuntuNumberAnimation { target: decoratedWindow; properties: "itemScale"; to: 1; duration: priv.animationDuration }
754759 onStopped: appDelegate.focus = true
@@ -784,6 +789,24 @@ AbstractStage {
784789 progress: 0
785790 targetHeight: spreadMaths.stackHeight
786791 targetX: spreadMaths.targetX
792+ startY: appDelegate.fullscreen ? 0 : PanelState.panelHeight
793+ targetY: spreadMaths.targetY
794+ targetAngle: spreadMaths.targetAngle
795+ targetScale: spreadMaths.targetScale
796+ }
797+
798+ SideStagedRightEdgeMaths {
799+ id: sideStagedRightEdgeMaths
800+ sceneWidth: appContainer.width - root.leftMargin
801+ sceneHeight: appContainer.height
802+ isMainStageApp: priv.mainStageDelegate == appDelegate
803+ isSideStageApp: priv.sideStageDelegate == appDelegate
804+ sideStageWidth: sideStage.width
805+ itemIndex: index
806+ progress: 0
807+ targetHeight: spreadMaths.stackHeight
808+ targetX: spreadMaths.targetX
809+ startY: appDelegate.fullscreen ? 0 : PanelState.panelHeight
787810 targetY: spreadMaths.targetY
788811 targetAngle: spreadMaths.targetAngle
789812 targetScale: spreadMaths.targetScale
@@ -820,32 +843,57 @@ AbstractStage {
820843 PropertyChanges { target: dragArea; enabled: true }
821844 PropertyChanges { target: windowInfoItem; opacity: spreadMaths.tileInfoOpacity; visible: spreadMaths.itemVisible }
822845 },
846+// State {
847+// name: "stagedrightedge";
848+// when: root.state == "stagedrightedge" || rightEdgeFocusAnimation.running || hidingAnimation.running
849+// PropertyChanges {
850+// target: stagedRightEdgeMaths
851+// progress: rightEdgeDragArea.progress
852+// }
853+// PropertyChanges {
854+// target: appDelegate
855+// y: stagedRightEdgeMaths.animatedY
856+// x: stagedRightEdgeMaths.animatedX
857+// z: index +1
858+// height: stagedRightEdgeMaths.animatedHeight
859+// requestedWidth: decoratedWindow.oldRequestedWidth
860+// requestedHeight: decoratedWindow.oldRequestedHeight
861+// visible: stagedRightEdgeMaths.itemVisible
862+// }
863+// PropertyChanges {
864+// target: decoratedWindow;
865+// hasDecoration: false
866+// angle: stagedRightEdgeMaths.animatedAngle
867+// itemScale: stagedRightEdgeMaths.animatedScale
868+// scaleToPreviewSize: spreadItem.stackHeight
869+// scaleToPreviewProgress: stagedRightEdgeMaths.scaleToPreviewProgress
870+// shadowOpacity: 0.3
871+// }
872+// },
823873 State {
824− name: "stagedrightedge";
825− when: root.state == "stagedrightedge" || rightEdgeFocusAnimation.running || hidingAnimation.running
874+ name: "sidestagedrightedge"
875+ when: root.state == "sidestagedrightedge" || root.state == "stagedrightedge" || rightEdgeFocusAnimation.running || hidingAnimation.running
826876 PropertyChanges {
827− target: stagedRightEdgeMaths
877+ target: sideStagedRightEdgeMaths
828878 progress: rightEdgeDragArea.progress
829− startY: appDelegate.fullscreen ? 0 : PanelState.panelHeight
830879 }
831880 PropertyChanges {
832881 target: appDelegate
833− y: stagedRightEdgeMaths.animatedY
834− x: stagedRightEdgeMaths.animatedX
882+ x: sideStagedRightEdgeMaths.animatedX
883+ y: sideStagedRightEdgeMaths.animatedY
835884 z: index +1
836− height: stagedRightEdgeMaths.animatedHeight
885+ height: sideStagedRightEdgeMaths.animatedHeight
837886 requestedWidth: decoratedWindow.oldRequestedWidth
838887 requestedHeight: decoratedWindow.oldRequestedHeight
839− visible: stagedRightEdgeMaths.itemVisible
840888 }
841889 PropertyChanges {
842− target: decoratedWindow;
890+ target: decoratedWindow
843891 hasDecoration: false
844− angle: stagedRightEdgeMaths.animatedAngle
845− itemScale: stagedRightEdgeMaths.animatedScale
892+ angle: sideStagedRightEdgeMaths.animatedAngle
893+ itemScale: sideStagedRightEdgeMaths.animatedScale
846894 scaleToPreviewSize: spreadItem.stackHeight
847− scaleToPreviewProgress: stagedRightEdgeMaths.scaleToPreviewProgress
848− shadowOpacity: 0.3
895+ scaleToPreviewProgress: sideStagedRightEdgeMaths.scaleToPreviewProgress
896+ shadowOpacity: .3
849897 }
850898 },
851899 State {