Manage Drag in a TapHandler which accepts also touch

the Drag attached was set to active in a taphandler which didn't
accept touch, breaking drag and drop on wayland+touch
moving the logic on the other handler makes it work everywhere
This commit is contained in:
Marco Martin 2022-09-13 13:38:55 +02:00
parent ed4f5d3e7e
commit 5dd8bf8e8b

View file

@ -347,14 +347,6 @@ Item {
KWinComponents.Workspace.activeClient = thumb.client;
thumb.windowHeap.activated();
}
}
TapHandler {
acceptedPointerTypes: PointerDevice.GenericPointer | PointerDevice.Pen
acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
onTapped: {
thumb.windowHeap.windowClicked(thumb.client, eventPoint)
}
onPressedChanged: {
if (pressed) {
var saved = Qt.point(thumbSource.x, thumbSource.y);
@ -369,6 +361,14 @@ Item {
}
}
TapHandler {
acceptedPointerTypes: PointerDevice.GenericPointer | PointerDevice.Pen
acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
onTapped: {
thumb.windowHeap.windowClicked(thumb.client, eventPoint)
}
}
component DragManager : DragHandler {
target: null
dragThreshold: 0