summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/imports/compositor/WaylandCursorItem.qml9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/imports/compositor/WaylandCursorItem.qml b/src/imports/compositor/WaylandCursorItem.qml
index 331784109..1fa099676 100644
--- a/src/imports/compositor/WaylandCursorItem.qml
+++ b/src/imports/compositor/WaylandCursorItem.qml
@@ -46,16 +46,15 @@ WaylandQuickItem {
property QtObject seat
property int hotspotX: 0
property int hotspotY: 0
- // If we've set an output scale factor different from the device pixel ratio
- // then the item will be rendered scaled, so we need to shift the hotspot accordingly
- property real scaleCorrection: output ? output.scaleFactor / Screen.devicePixelRatio : 1
visible: cursorItem.surface != null
inputEventsEnabled: false
enabled: false
transform: Translate {
- x: -hotspotX * scaleCorrection
- y: -hotspotY * scaleCorrection
+ // If we've set an output scale factor different from the device pixel ratio
+ // then the item will be rendered scaled, so we need to shift the hotspot accordingly
+ x: -hotspotX * (output ? output.scaleFactor / Screen.devicePixelRatio : 1)
+ y: -hotspotY * (output ? output.scaleFactor / Screen.devicePixelRatio : 1)
}
Connections {