@@ -731,9 +731,15 @@ AbstractStage {
731731 }
732732
733733 function playFocusAnimation() {
734− if (state == "stagedrightedge" || state == "sidestagedrightedge") {
735− rightEdgeFocusAnimation.targetX = appDelegate.stage == ApplicationInfoInterface.SideStage ? sideStage.x : 0
736− rightEdgeFocusAnimation.start()
734+ if (state == "sidestagedrightedge") {
735+ // TODO: Can we drop this if and find something that always works?
736+ if (root.mode == "staged") {
737+ rightEdgeFocusAnimation.targetX = 0
738+ rightEdgeFocusAnimation.start()
739+ } else if (root.mode == "stagedWithSideStage") {
740+ rightEdgeFocusAnimation.targetX = appDelegate.stage == ApplicationInfoInterface.SideStage ? sideStage.x : 0
741+ rightEdgeFocusAnimation.start()
742+ }
737743 } else {
738744 focusAnimation.start()
739745 }
@@ -753,7 +759,7 @@ AbstractStage {
753759 ParallelAnimation {
754760 id: rightEdgeFocusAnimation
755761 property int targetX: 0
756− UbuntuNumberAnimation { target: appDelegate; properties: "x"; to: targetX; duration: priv.animationDuration }
762+ UbuntuNumberAnimation { target: appDelegate; properties: "x"; to: rightEdgeFocusAnimation.targetX; duration: priv.animationDuration }
757763 UbuntuNumberAnimation { target: decoratedWindow; properties: "angle"; to: 0; duration: priv.animationDuration }
758764 UbuntuNumberAnimation { target: decoratedWindow; properties: "itemScale"; to: 1; duration: priv.animationDuration }
759765 onStopped: appDelegate.focus = true