From 9889e0df114d089d78c366672d61f62f81aed81f Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Fri, 16 Sep 2022 20:32:01 +0300 Subject: [PATCH] effects/desktopgrid: Fix cursor shape being lost while dragging a desktop DragHandler does not travel along with its target heap, so it only affects the cursor shape when the mouse pointer is directly over it; but when a desktop is dragged far outside, the cursor resets. Besides, this is how we already implemented it in WindowHeapDelegate. FIXED-IN: 5.26 --- src/effects/desktopgrid/qml/DesktopView.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/effects/desktopgrid/qml/DesktopView.qml b/src/effects/desktopgrid/qml/DesktopView.qml index 8d85ee6158..bcbb0e81da 100644 --- a/src/effects/desktopgrid/qml/DesktopView.qml +++ b/src/effects/desktopgrid/qml/DesktopView.qml @@ -88,7 +88,6 @@ FocusScope { id: dragHandler target: heap grabPermissions: PointerHandler.ApprovesTakeOverByHandlersOfSameType - cursorShape: active ? Qt.ClosedHandCursor : Qt.ArrowCursor onActiveChanged: { if (!active) { heap.Drag.drop(); @@ -162,6 +161,12 @@ FocusScope { } } + MouseArea { + anchors.fill: heap + acceptedButtons: Qt.NoButton + cursorShape: dragHandler.active ? Qt.ClosedHandCursor : Qt.ArrowCursor + } + PC3.Control { id: desktopLabel anchors.margins: PlasmaCore.Units.largeSpacing