@@ -46,6 +46,7 @@ FocusScope {
4646 property int leftMargin: 0
4747 property bool oskEnabled: false
4848 property rect inputMethodRect
49+ property real rightEdgePushProgress: 0
4950
5051 // Configuration
5152 property string mode: "staged"
@@ -127,11 +128,6 @@ FocusScope {
127128 // functions to be called from outside
128129 function updateFocusedAppOrientation() { /* TODO */ }
129130 function updateFocusedAppOrientationAnimated() { /* TODO */}
130− function pushRightEdge(amount) {
131− if (root.spreadEnabled) {
132− edgeBarrier.push(amount);
133− }
134− }
135131
136132 function closeSpread() {
137133 priv.goneToSpread = false;
@@ -143,6 +139,12 @@ FocusScope {
143139 }
144140 }
145141
142+ onRightEdgePushProgressChanged: {
143+ if (spreadEnabled && rightEdgePushProgress >= 1) {
144+ priv.goneToSpread = true
145+ }
146+ }
147+
146148 GSettings {
147149 id: lifecycleExceptions
148150 schema.id: "com.canonical.qtmir"
@@ -454,7 +456,7 @@ FocusScope {
454456 PropertyChanges { target: wallpaper; visible: false }
455457 },
456458 State {
457− name: "stagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "staged"
459+ name: "stagedRightEdge"; when: root.spreadEnabled && (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "staged"
458460 PropertyChanges {
459461 target: blurLayer;
460462 visible: true;
@@ -464,7 +466,7 @@ FocusScope {
464466 }
465467 },
466468 State {
467− name: "sideStagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "stagedWithSideStage"
469+ name: "sideStagedRightEdge"; when: root.spreadEnabled && (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "stagedWithSideStage"
468470 extend: "stagedRightEdge"
469471 PropertyChanges {
470472 target: sideStage
@@ -473,13 +475,13 @@ FocusScope {
473475 }
474476 },
475477 State {
476− name: "windowedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "windowed"
478+ name: "windowedRightEdge"; when: root.spreadEnabled && (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "windowed"
477479 PropertyChanges {
478480 target: blurLayer;
479481 visible: true
480482 blurRadius: 32
481483 brightness: .65
482− opacity: MathUtils.linearAnimation(spreadItem.rightEdgeBreakPoint, 1, 0, 1, Math.max(rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0, edgeBarrier.progress))
484+ opacity: MathUtils.linearAnimation(spreadItem.rightEdgeBreakPoint, 1, 0, 1, Math.max(rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0, rightEdgePushProgress))
483485 }
484486 },
485487 State {
@@ -1203,7 +1205,7 @@ FocusScope {
12031205 when: (root.mode == "staged" || root.mode == "stagedWithSideStage") && (root.state == "sideStagedRightEdge" || root.state == "stagedRightEdge" || rightEdgeFocusAnimation.running || hidingAnimation.running)
12041206 PropertyChanges {
12051207 target: stagedRightEdgeMaths
1206− progress: Math.max(edgeBarrier.progress, rightEdgeDragArea.draggedProgress)
1208+ progress: Math.max(rightEdgePushProgress, rightEdgeDragArea.draggedProgress)
12071209 }
12081210 PropertyChanges {
12091211 target: appDelegate
@@ -1230,11 +1232,11 @@ FocusScope {
12301232 },
12311233 State {
12321234 name: "windowedRightEdge"
1233− when: root.mode == "windowed" && (root.state == "windowedRightEdge" || rightEdgeFocusAnimation.running || hidingAnimation.running || edgeBarrier.progress > 0)
1235+ when: root.mode == "windowed" && (root.state == "windowedRightEdge" || rightEdgeFocusAnimation.running || hidingAnimation.running || rightEdgePushProgress > 0)
12341236 PropertyChanges {
12351237 target: windowedRightEdgeMaths
12361238 swipeProgress: rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0
1237− pushProgress: edgeBarrier.progress
1239+ pushProgress: rightEdgePushProgress
12381240 }
12391241 PropertyChanges {
12401242 target: appDelegate
@@ -1766,30 +1768,6 @@ FocusScope {
17661768 appContainerHeight: appContainer.height
17671769 }
17681770
1769− EdgeBarrier {
1770− id: edgeBarrier
1771−
1772− // NB: it does its own positioning according to the specified edge
1773− edge: Qt.RightEdge
1774−
1775− onPassed: priv.goneToSpread = true;
1776−
1777− material: Component {
1778− Item {
1779− Rectangle {
1780− width: parent.height
1781− height: parent.width
1782− rotation: 90
1783− anchors.centerIn: parent
1784− gradient: Gradient {
1785− GradientStop { position: 0.0; color: Qt.rgba(0.16,0.16,0.16,0.5)}
1786− GradientStop { position: 1.0; color: Qt.rgba(0.16,0.16,0.16,0)}
1787− }
1788− }
1789− }
1790− }
1791− }
1792−
17931771 MouseArea {
17941772 id: hoverMouseArea
17951773 objectName: "hoverMouseArea"