kwin/mobiletaskswitcher: Restore touchscreen functionality to app activation

This commit is contained in:
Devin Lin 2023-03-30 23:05:27 -07:00
parent b3dc5f15ad
commit 88d9c066af
3 changed files with 13 additions and 15 deletions

View file

@ -117,12 +117,12 @@ MouseArea {
}
// launch app handled by press animation
onClicked: mouse => {
if (mouse.button === Qt.RightButton) {
openContextMenu();
} else {
launchAppRequested = true;
}
}
if (mouse.button === Qt.RightButton) {
openContextMenu();
} else {
launchAppRequested = true;
}
}
ColumnLayout {
anchors {

View file

@ -62,6 +62,12 @@ Item {
oldY = y;
}
onClicked: {
if (!taskSwitcher.taskSwitcherState.currentlyBeingOpened) {
delegate.activateApp();
}
}
// drag up gesture
DragHandler {
id: dragHandler
@ -168,7 +174,7 @@ Item {
clip: true
// scale animation on press
property real zoomScale: tapHandler.pressed ? 0.9 : 1
property real zoomScale: control.pressed ? 0.9 : 1
Behavior on zoomScale {
NumberAnimation {
duration: 200
@ -199,12 +205,6 @@ Item {
}
}
}
TapHandler {
id: tapHandler
enabled: !taskSwitcher.taskSwitcherState.currentlyBeingOpened
onTapped: delegate.activateApp()
}
}
}
}

View file

@ -69,7 +69,6 @@ MouseArea {
}
onClicked: {
console.log('tapped')
// if tapped on the background, then hide
if (!taskSwitcherState.currentlyBeingOpened) {
taskSwitcher.hide();
@ -77,7 +76,6 @@ MouseArea {
}
onPressedChanged: {
console.log('pressed')
if (!taskSwitcherState.currentlyBeingOpened && pressed) {
// ensure animations aren't running when finger is pressed
taskSwitcherState.cancelAnimations();