gestures: Trigger task switcher when mouse pulls up on gesture bar

As a stopgap until we have
https://invent.kde.org/plasma/plasma-mobile/-/issues/492, simply trigger
the task switcher when a mouse pulls up on the gesture bar.
This commit is contained in:
Devin Lin 2025-12-15 19:17:46 -05:00
parent afa2f06b47
commit 832597f926

View file

@ -35,6 +35,19 @@ Rectangle {
onClicked: root.handleClicked()
onPressAndHold: root.handlePressedAndHeld()
property real startX
property real startY
onPressed: {
startX = mouseX;
startY = mouseY;
}
onPositionChanged: (mouse) => {
// Trigger gesture after threshold is crossed (root.height)
if (startY - mouse.y > root.height) {
root.handleClicked();
}
}
Rectangle {
anchors.centerIn: parent
width: parent.width