summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2010-04-29 09:41:26 (GMT)
committerJason Barron <jbarron@trolltech.com>2010-04-29 11:50:58 (GMT)
commit89c588ab206e5358544d9402fb3b44aeddf634dc (patch)
tree797b3b89e51518abafd421643236a6a47ad861c0 /src/gui
parente07a0d8acae7feb4142f0848baf68cee267498fe (diff)
downloadQt-89c588ab206e5358544d9402fb3b44aeddf634dc.zip
Qt-89c588ab206e5358544d9402fb3b44aeddf634dc.tar.gz
Qt-89c588ab206e5358544d9402fb3b44aeddf634dc.tar.bz2
Map Symbian touch points to the screen's coordinate system.
The 'iPosition' that we receive from the TAdvancedPointerEvent is relative to the origin of the window that received the event, not the screen so it needs to mapped to be correct. Reviewed-by: Bradley T. Hughes
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 7087b47..2bd29fc 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -440,7 +440,7 @@ void QSymbianControl::translateAdvancedPointerEvent(const TAdvancedPointerEvent
state |= Qt::TouchPointPrimary;
touchPoint.setState(state);
- QPointF screenPos = QPointF(event->iPosition.iX, event->iPosition.iY);
+ QPointF screenPos = qwidget->mapToGlobal(QPoint(event->iPosition.iX, event->iPosition.iY));
touchPoint.setScreenPos(screenPos);
touchPoint.setNormalizedPos(QPointF(screenPos.x() / screenGeometry.width(),
screenPos.y() / screenGeometry.height()));