on xenial help sign in
fix the spreadEnabled property
commit9eda82ef71722e428b9bfe78f68e29a4475fd0b3 authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 1 Dec 2016, 12:52 (10 years ago) parent762a07f
2 files changed+6−5
qml/Stage/Stage.qml+4−4 tests/qmltests/tst_Shell.qml+2−1
qml/Stage/Stage.qml+4−4
@@ -141,7 +141,7 @@ FocusScope {
141141 }
142142
143143 onRightEdgePushProgressChanged: {
144− if (rightEdgePushProgress >= 1) {
144+ if (spreadEnabled && rightEdgePushProgress >= 1) {
145145 priv.goneToSpread = true
146146 }
147147 }
@@ -455,7 +455,7 @@ FocusScope {
455455 PropertyChanges { target: wallpaper; visible: false }
456456 },
457457 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"
459459 PropertyChanges {
460460 target: blurLayer;
461461 visible: true;
@@ -465,7 +465,7 @@ FocusScope {
465465 }
466466 },
467467 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"
469469 extend: "stagedRightEdge"
470470 PropertyChanges {
471471 target: sideStage
@@ -474,7 +474,7 @@ FocusScope {
474474 }
475475 },
476476 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"
478478 PropertyChanges {
479479 target: blurLayer;
480480 visible: true
tests/qmltests/tst_Shell.qml+2−1
@@ -2868,9 +2868,10 @@ Rectangle {
28682868 tryCompare(stage, "state", "staged");
28692869
28702870 // Try by edge push
2871+ var cursor = findChild(shell, "cursor");
28712872 mouseMove(stage, stage.width - 1, units.gu(10));
28722873 for (var i = 0; i < units.gu(10); i++) {
2873− stage.pushRightEdge(1);
2874+ cursor.pushedRightBoundary(1, 0);
28742875 }
28752876 mouseMove(stage, stage.width - units.gu(5), units.gu(10));
28762877 tryCompare(stage, "state", data.spreadEnabled ? "spread" : "staged");