mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
kwin/mobiletaskswitcher: Restore touchscreen functionality to app activation
This commit is contained in:
parent
b3dc5f15ad
commit
88d9c066af
3 changed files with 13 additions and 15 deletions
|
|
@ -117,12 +117,12 @@ MouseArea {
|
||||||
}
|
}
|
||||||
// launch app handled by press animation
|
// launch app handled by press animation
|
||||||
onClicked: mouse => {
|
onClicked: mouse => {
|
||||||
if (mouse.button === Qt.RightButton) {
|
if (mouse.button === Qt.RightButton) {
|
||||||
openContextMenu();
|
openContextMenu();
|
||||||
} else {
|
} else {
|
||||||
launchAppRequested = true;
|
launchAppRequested = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors {
|
anchors {
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,12 @@ Item {
|
||||||
oldY = y;
|
oldY = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
if (!taskSwitcher.taskSwitcherState.currentlyBeingOpened) {
|
||||||
|
delegate.activateApp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// drag up gesture
|
// drag up gesture
|
||||||
DragHandler {
|
DragHandler {
|
||||||
id: dragHandler
|
id: dragHandler
|
||||||
|
|
@ -168,7 +174,7 @@ Item {
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
// scale animation on press
|
// scale animation on press
|
||||||
property real zoomScale: tapHandler.pressed ? 0.9 : 1
|
property real zoomScale: control.pressed ? 0.9 : 1
|
||||||
Behavior on zoomScale {
|
Behavior on zoomScale {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: 200
|
duration: 200
|
||||||
|
|
@ -199,12 +205,6 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TapHandler {
|
|
||||||
id: tapHandler
|
|
||||||
enabled: !taskSwitcher.taskSwitcherState.currentlyBeingOpened
|
|
||||||
onTapped: delegate.activateApp()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,6 @@ MouseArea {
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log('tapped')
|
|
||||||
// if tapped on the background, then hide
|
// if tapped on the background, then hide
|
||||||
if (!taskSwitcherState.currentlyBeingOpened) {
|
if (!taskSwitcherState.currentlyBeingOpened) {
|
||||||
taskSwitcher.hide();
|
taskSwitcher.hide();
|
||||||
|
|
@ -77,7 +76,6 @@ MouseArea {
|
||||||
}
|
}
|
||||||
|
|
||||||
onPressedChanged: {
|
onPressedChanged: {
|
||||||
console.log('pressed')
|
|
||||||
if (!taskSwitcherState.currentlyBeingOpened && pressed) {
|
if (!taskSwitcherState.currentlyBeingOpened && pressed) {
|
||||||
// ensure animations aren't running when finger is pressed
|
// ensure animations aren't running when finger is pressed
|
||||||
taskSwitcherState.cancelAnimations();
|
taskSwitcherState.cancelAnimations();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue