on xenial help sign in
fix the spreadEnabled property
9eda82eMichael Zanetti
qml/Stage/Stage.qml+4−4
@@ -141,7 +141,7 @@ FocusScope {
141 }
141 }
142
142
143 onRightEdgePushProgressChanged: {
143 onRightEdgePushProgressChanged: {
144− if (rightEdgePushProgress >= 1) {
144+ if (spreadEnabled && rightEdgePushProgress >= 1) {
145 priv.goneToSpread = true
145 priv.goneToSpread = true
146 }
146 }
147 }
147 }
@@ -455,7 +455,7 @@ FocusScope {
455 PropertyChanges { target: wallpaper; visible: false }
455 PropertyChanges { target: wallpaper; visible: false }
456 },
456 },
457 State {
457 State {
458− name: "stagedRightEdge"; when: (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "staged"
458+ name: "stagedRightEdge"; when: root.spreadEnabled && (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "staged"
459 PropertyChanges {
459 PropertyChanges {
460 target: blurLayer;
460 target: blurLayer;
461 visible: true;
461 visible: true;
@@ -465,7 +465,7 @@ FocusScope {
465 }
465 }
466 },
466 },
467 State {
467 State {
468− name: "sideStagedRightEdge"; when: (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "stagedWithSideStage"
468+ name: "sideStagedRightEdge"; when: root.spreadEnabled && (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "stagedWithSideStage"
469 extend: "stagedRightEdge"
469 extend: "stagedRightEdge"
470 PropertyChanges {
470 PropertyChanges {
471 target: sideStage
471 target: sideStage
@@ -474,7 +474,7 @@ FocusScope {
474 }
474 }
475 },
475 },
476 State {
476 State {
477− name: "windowedRightEdge"; when: (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "windowed"
477+ name: "windowedRightEdge"; when: root.spreadEnabled && (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "windowed"
478 PropertyChanges {
478 PropertyChanges {
479 target: blurLayer;
479 target: blurLayer;
480 visible: true
480 visible: true
tests/qmltests/tst_Shell.qml+2−1
@@ -2868,9 +2868,10 @@ Rectangle {
2868 tryCompare(stage, "state", "staged");
2868 tryCompare(stage, "state", "staged");
2869
2869
2870 // Try by edge push
2870 // Try by edge push
2871+ var cursor = findChild(shell, "cursor");
2871 mouseMove(stage, stage.width - 1, units.gu(10));
2872 mouseMove(stage, stage.width - 1, units.gu(10));
2872 for (var i = 0; i < units.gu(10); i++) {
2873 for (var i = 0; i < units.gu(10); i++) {
2873− stage.pushRightEdge(1);
2874+ cursor.pushedRightBoundary(1, 0);
2874 }
2875 }
2875 mouseMove(stage, stage.width - units.gu(5), units.gu(10));
2876 mouseMove(stage, stage.width - units.gu(5), units.gu(10));
2876 tryCompare(stage, "state", data.spreadEnabled ? "spread" : "staged");
2877 tryCompare(stage, "state", data.spreadEnabled ? "spread" : "staged");