@@ -430,9 +430,10 @@ Rectangle {
430 spreadView.phase = 0;
430 spreadView.phase = 0;
431 spreadView.contentX = -spreadView.shift;
431 spreadView.contentX = -spreadView.shift;
433− if (dragging && attachedToView) {
433+ if (dragging && status == DirectionalDragArea.Recognized && attachedToView) {
434 // Gesture recognized. Let's move the spreadView with the finger
434 // Gesture recognized. Let's move the spreadView with the finger
435+ var finalX = Math.min(touchX + width, width);
435− spreadView.contentX = -touchX + spreadDragArea.width - spreadView.shift;
436+ spreadView.contentX = -finalX + spreadDragArea.width - spreadView.shift;
437 if (attachedToView && spreadView.shiftedContentX >= spreadView.width * spreadView.positionMarker3) {
438 if (attachedToView && spreadView.shiftedContentX >= spreadView.width * spreadView.positionMarker3) {
438 // We passed positionMarker3. Detach from spreadView and snap it.
439 // We passed positionMarker3. Detach from spreadView and snap it.
@@ -442,7 +443,13 @@ Rectangle {
442 gesturePoints.push(touchX);
443 gesturePoints.push(touchX);
446+ property int previousStatus: -1
447+ property int currentStatus: DirectionalDragArea.WaitingForTouch
445 onStatusChanged: {
449 onStatusChanged: {
450+ previousStatus = currentStatus;
451+ currentStatus = status;
446 if (status == DirectionalDragArea.Recognized) {
453 if (status == DirectionalDragArea.Recognized) {
447 attachedToView = true;
454 attachedToView = true;
@@ -450,7 +457,7 @@ Rectangle {
451 onDraggingChanged: {
458 onDraggingChanged: {
452 if (dragging) {
459 if (dragging) {
453− // Gesture recognized. Start recording this gesture
460+ // A potential edge-drag gesture has started. Start recording it
454 gesturePoints = [];
461 gesturePoints = [];
@@ -467,7 +474,8 @@ Rectangle {
468 gesturePoints = [];
475 gesturePoints = [];
477+ if (previousStatus == DirectionalDragArea.Recognized &&
470− if (oneWayFlick && spreadView.shiftedContentX > units.gu(2) &&
478+ oneWayFlick && spreadView.shiftedContentX > units.gu(2) &&
471 spreadView.shiftedContentX < spreadView.positionMarker1 * spreadView.width) {
479 spreadView.shiftedContentX < spreadView.positionMarker1 * spreadView.width) {
472 // If it was a short one-way movement, do the Alt+Tab switch
480 // If it was a short one-way movement, do the Alt+Tab switch
473 // no matter if we didn't cross positionMarker1 yet.
481 // no matter if we didn't cross positionMarker1 yet.