summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index da1c778..80bcdf0 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -582,13 +582,20 @@ QPoint QSymbianControl::translatePointForFixedNativeOrientation(const TPoint &po
{
QPoint pos(pointerEventPos.iX, pointerEventPos.iY);
if (qwidget->d_func()->fixNativeOrientationCalled) {
- QSize wsize = qwidget->size();
- TSize size = Size();
+ QSize wsize = qwidget->size(); // always same as the size in the native orientation
+ TSize size = Size(); // depends on the current orientation
if (size.iWidth == wsize.height() && size.iHeight == wsize.width()) {
qreal x = pos.x();
qreal y = pos.y();
- pos.setX(size.iHeight - y);
- pos.setY(x);
+ if (S60->screenRotation == QS60Data::ScreenRotation90) {
+ // DisplayRightUp
+ pos.setX(size.iHeight - y);
+ pos.setY(x);
+ } else if (S60->screenRotation == QS60Data::ScreenRotation270) {
+ // DisplayLeftUp
+ pos.setX(y);
+ pos.setY(size.iWidth - x);
+ }
}
}
return pos;
@@ -2760,6 +2767,9 @@ QS60ThreadLocalData::QS60ThreadLocalData()
QS60ThreadLocalData::~QS60ThreadLocalData()
{
+ for (int i = 0; i < releaseFuncs.count(); ++i)
+ releaseFuncs[i]();
+ releaseFuncs.clear();
if (!usingCONEinstances) {
delete screenDevice;
wsSession.Close();