diff --git a/kwin/mobiletaskswitcher/qml/Task.qml b/kwin/mobiletaskswitcher/qml/Task.qml index a2342d88..8ccaa79c 100644 --- a/kwin/mobiletaskswitcher/qml/Task.qml +++ b/kwin/mobiletaskswitcher/qml/Task.qml @@ -25,7 +25,13 @@ Item { readonly property real dragOffset: -control.y + // whether this task is being interacted with + readonly property bool interactingActive: control.pressed && control.passedDragThreshold + + // whether to show the text header property bool showHeader: true + + // the amount to darken the task preview by property real darken: 0 opacity: 1 - dragOffset / taskSwitcher.height @@ -88,7 +94,6 @@ Item { // set threshold if (!passedDragThreshold && Math.abs(y) > dragThreshold) { passedDragThreshold = true; - // TODO: request that FlickContainer be not interactive (so we don't change position in list while swiping up) } // update position diff --git a/kwin/mobiletaskswitcher/qml/TaskList.qml b/kwin/mobiletaskswitcher/qml/TaskList.qml index 996a0f53..d535eb94 100644 --- a/kwin/mobiletaskswitcher/qml/TaskList.qml +++ b/kwin/mobiletaskswitcher/qml/TaskList.qml @@ -19,6 +19,8 @@ MouseArea { required property var taskSwitcher readonly property var taskSwitcherState: taskSwitcher.taskSwitcherState + property int taskInteractingCount: 0 + // account for system header and footer offset (center the preview image) readonly property real taskY: { let headerHeight = shellTopMargin; @@ -95,7 +97,6 @@ MouseArea { // this is the x-position with respect to the list property real listX: taskSwitcherState.xPositionFromTaskIndex(currentIndex); - Behavior on listX { NumberAnimation { duration: PlasmaCore.Units.longDuration @@ -120,6 +121,12 @@ MouseArea { return Math.max(0, upperBoundAdjust); } + // update count of tasks being interacted with, so we know whether we are in a swipe up action + onInteractingActiveChanged: { + let offset = interactingActive ? 1 : -1; + taskInteractingCount = Math.max(0, taskInteractingCount + offset); + } + width: taskSwitcherState.taskWidth height: taskSwitcherState.taskHeight previewWidth: taskSwitcherState.previewWidth diff --git a/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml b/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml index 25afb2e0..2aab2c31 100644 --- a/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml +++ b/kwin/mobiletaskswitcher/qml/TaskSwitcher.qml @@ -196,6 +196,9 @@ FocusScope { taskSwitcherState: root.taskSwitcherState + // don't allow FlickContainer to steal from swiping on tasks + interactive: taskList.taskInteractingCount === 0 + // the item is effectively anchored to the flickable bounds TaskList { id: taskList diff --git a/look-and-feel/contents/lockscreen/LockScreenState.qml b/look-and-feel/contents/lockscreen/LockScreenState.qml index 2d88ce4c..8250ec30 100644 --- a/look-and-feel/contents/lockscreen/LockScreenState.qml +++ b/look-and-feel/contents/lockscreen/LockScreenState.qml @@ -24,7 +24,6 @@ QtObject { signal unlockFailed() function tryPassword() { - console.log('try') if (root.password !== '') { // prevent typing lock when password is empty waitingForAuth = true; }