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
This commit is contained in:
ivan tkachenko 2022-09-16 20:32:01 +03:00
parent 494feb2eea
commit 9889e0df11
No known key found for this signature in database
GPG key ID: AF72731B7C654CB3

View file

@ -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