summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2016-07-07 15:12:45 +0200
committerJohan Helsing <johan.helsing@qt.io>2016-07-11 10:07:34 +0000
commit839f40ccf522bef3ed4b499899a23393a9a8a1aa (patch)
treebb2e6c2700177fc9d19f477f3f56a88ac1c0ece7
parenta7a2390b8a659b07f44752a538d098e9a762c2eb (diff)
Add drag icon to WaylandCursorItem
Change-Id: I683d568b8161828aa47ecc4e7f90741189ac4bae Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
-rw-r--r--src/imports/compositor/WaylandCursorItem.qml15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/imports/compositor/WaylandCursorItem.qml b/src/imports/compositor/WaylandCursorItem.qml
index 979d64ab0..af2b76aa8 100644
--- a/src/imports/compositor/WaylandCursorItem.qml
+++ b/src/imports/compositor/WaylandCursorItem.qml
@@ -59,4 +59,19 @@ WaylandQuickItem {
cursorItem.hotspotX = hotspotX;
cursorItem.hotspotY = hotspotY;
}
+
+ WaylandQuickItem {
+ id: dragIcon
+ property point offset
+
+ x: cursorItem.hotspotX + offset.x
+ y: cursorItem.hotspotY + offset.y
+ z: -1
+ surface: cursorItem.inputDevice.drag.icon
+
+ Connections {
+ target: dragIcon.surface
+ onOffsetForNextFrame: dragIcon.offset = offset;
+ }
+ }
}