diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2016-07-07 15:11:35 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2016-07-11 09:47:53 +0000 |
commit | 411a2672f8bb057614abd0aedb3c321d5dc92363 (patch) | |
tree | d1727c1d928ebab57ec609ca66ac73835135916d | |
parent | acc585d0c96665b2efab0d622250ed209155d534 (diff) |
Adjust for hotspot position inside WaylandCursorItem
Change-Id: Ide6605b7bd05f739976ed603c19e030ec74d2a2a
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
4 files changed, 7 insertions, 6 deletions
diff --git a/examples/wayland/custom-extension/compositor/qml/Screen.qml b/examples/wayland/custom-extension/compositor/qml/Screen.qml index a4e69300f..a1e43a00b 100644 --- a/examples/wayland/custom-extension/compositor/qml/Screen.qml +++ b/examples/wayland/custom-extension/compositor/qml/Screen.qml @@ -69,8 +69,8 @@ WaylandOutput { WaylandCursorItem { id: cursor inputEventsEnabled: false - x: mouseTracker.mouseX - hotspotX - y: mouseTracker.mouseY - hotspotY + x: mouseTracker.mouseX + y: mouseTracker.mouseY inputDevice: output.compositor.defaultInputDevice } diff --git a/examples/wayland/multi-output/qml/ShellScreen.qml b/examples/wayland/multi-output/qml/ShellScreen.qml index 0e53ba074..2ac22367f 100644 --- a/examples/wayland/multi-output/qml/ShellScreen.qml +++ b/examples/wayland/multi-output/qml/ShellScreen.qml @@ -66,8 +66,8 @@ WaylandOutput { WaylandCursorItem { id: cursor inputEventsEnabled: false - x: mouseTracker.mouseX - hotspotX - y: mouseTracker.mouseY - hotspotY + x: mouseTracker.mouseX + y: mouseTracker.mouseY inputDevice : output.compositor.defaultInputDevice } diff --git a/examples/wayland/pure-qml/qml/Screen.qml b/examples/wayland/pure-qml/qml/Screen.qml index 59eeee75b..968aad818 100644 --- a/examples/wayland/pure-qml/qml/Screen.qml +++ b/examples/wayland/pure-qml/qml/Screen.qml @@ -73,8 +73,8 @@ WaylandOutput { WaylandCursorItem { id: cursor inputEventsEnabled: false - x: mouseTracker.mouseX - hotspotX - y: mouseTracker.mouseY - hotspotY + x: mouseTracker.mouseX + y: mouseTracker.mouseY inputDevice: output.compositor.defaultInputDevice } diff --git a/src/imports/compositor/WaylandCursorItem.qml b/src/imports/compositor/WaylandCursorItem.qml index dab80da64..979d64ab0 100644 --- a/src/imports/compositor/WaylandCursorItem.qml +++ b/src/imports/compositor/WaylandCursorItem.qml @@ -46,6 +46,7 @@ WaylandQuickItem { visible: cursorItem.surface != null inputEventsEnabled: false enabled: false + transform: Translate { x: -hotspotX; y: -hotspotY } onInputDeviceChanged: { if (!inputDevice) |