on xenial help sign in
map the touch coords
commit3ea5d0492a4897559474aee5710b8281764cf968 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateThu 3 Dec 2015, 16:21 (11 years ago) parentb73d337
1 file changed+3−2
qml/Shell.qml+3−2
qml/Shell.qml+3−2
@@ -181,8 +181,9 @@ Item {
181181 onTouchBegun: { cursor.opacity = 0; }
182182 onTouchEnded: {
183183 // move the (hidden) cursor to the last known touch position
184− cursor.x = pos.x;
185− cursor.y = pos.y;
184+ var mappedCoords = shell.parent ? mapFromItem(shell.parent, pos.x, pos.y) : Qt.point(pos.x, pos.y)
185+ cursor.x = mappedCoords.x;
186+ cursor.y = mappedCoords.y;
186187 }
187188 }
188189