From 5dd8bf8e8b1f90e5623a1c0602d0c3a73930d707 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 13 Sep 2022 13:38:55 +0200 Subject: [PATCH] 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 --- src/effects/private/qml/WindowHeapDelegate.qml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/effects/private/qml/WindowHeapDelegate.qml b/src/effects/private/qml/WindowHeapDelegate.qml index fa440e9c3d..0283c84a3c 100644 --- a/src/effects/private/qml/WindowHeapDelegate.qml +++ b/src/effects/private/qml/WindowHeapDelegate.qml @@ -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