@@ -1331,41 +1331,32 @@ AbstractStage {
1331 // A potential edge-drag gesture has started. Start recording it
1331 // A potential edge-drag gesture has started. Start recording it
1332 gesturePoints = [];
1332 gesturePoints = [];
1333 } else {
1333 } else {
1334+ // Ok. The user released. Did he drag far enough to go to full spread?
1334 if (gesturePoints[gesturePoints.length - 1] < -root.width * 0.4 ) {
1335 if (gesturePoints[gesturePoints.length - 1] < -root.width * 0.4 ) {
1335 print("gone to spread true")
1336 print("gone to spread true")
1336 priv.goneToSpread = true;
1337 priv.goneToSpread = true;
1337 } else {
1338 } else {
1339+ // Find out if it was a one-way movement.
1340+ var oneWayFlick = true;
1341+ var smallestX = rightEdgeDragArea.width;
1342+ for (var i = 0; i < gesturePoints.length; i++) {
1343+ if (gesturePoints[i] >= smallestX) {
1344+ oneWayFlick = false;
1347+ smallestX = gesturePoints[i];
1338− if (appRepeater.count > 1) {
1350+ if (appRepeater.count > 1 &&
1339− print("playing focus animation for", priv.nextInStack)
1351+ (oneWayFlick && rightEdgeDragArea.distance > units.gu(2) || rightEdgeDragArea.distance > root.width * .3)) {
1340 appRepeater.itemAt(0).playHidingAnimation()
1352 appRepeater.itemAt(0).playHidingAnimation()
1341 appRepeater.itemAt(priv.nextInStack).playFocusAnimation()
1353 appRepeater.itemAt(priv.nextInStack).playFocusAnimation()
1342 } else {
1354 } else {
1343 appRepeater.itemAt(0).playFocusAnimation();
1355 appRepeater.itemAt(0).playFocusAnimation();
1347−// // Ok. The user released. Find out if it was a one-way movement.
1348−// var oneWayFlick = true;
1349−// var smallestX = spreadDragArea.width;
1350−// for (var i = 0; i < gesturePoints.length; i++) {
1351−// if (gesturePoints[i] >= smallestX) {
1358+ gesturePoints = [];
1352−// oneWayFlick = false;
1355−// smallestX = gesturePoints[i];
1357−// gesturePoints = [];
1359−// if (oneWayFlick && spreadView.shiftedContentX > units.gu(2) &&
1360−// spreadView.shiftedContentX < spreadView.positionMarker1 * spreadView.width) {
1361−// // If it was a short one-way movement, do the Alt+Tab switch
1362−// // no matter if we didn't cross positionMarker1 yet.
1363−// spreadView.snapTo(1);
1364−// } else if (!dragging) {
1365−// // otherwise snap to the closest snap position we can find
1366−// // (might be back to start, to app 1 or to spread)
1367−// spreadView.snap();