summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-12 20:17:57 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-12 20:17:57 (GMT)
commitd1ddc7f25f1896a02707ecd295915a098ede11d8 (patch)
treefeb4c02efa1efa9af90bd0a0b24af701f2514a80
parentf474f0f900d48b41be1a3de1dffe48552ab23372 (diff)
parentc8f5e6043e9a8baa02905ad434e26f5602315ef4 (diff)
downloadQt-d1ddc7f25f1896a02707ecd295915a098ede11d8.zip
Qt-d1ddc7f25f1896a02707ecd295915a098ede11d8.tar.gz
Qt-d1ddc7f25f1896a02707ecd295915a098ede11d8.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fix spurious mouse click when dismissing a native menu
-rw-r--r--src/gui/kernel/qapplication_s60.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 2bd29fc..dbdcef9 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -642,10 +642,12 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
QPoint pos = QCursor::pos();
TPointerEvent fakeEvent;
+ fakeEvent.iType = (TPointerEvent::TType)(-1);
TInt x = pos.x();
TInt y = pos.y();
if (type == EEventKeyUp) {
- if (keyCode == Qt::Key_Select)
+ if (keyCode == Qt::Key_Select &&
+ (S60->virtualMousePressedKeys & QS60Data::Select))
fakeEvent.iType = TPointerEvent::EButton1Up;
S60->virtualMouseAccel = 1;
S60->virtualMouseLastKey = 0;
@@ -694,8 +696,7 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
// example for drag'n'drop), Symbian starts producing spurious up and
// down messages for some keys. Therefore, make sure we have a clean slate
// of pressed keys before starting a new button press.
- if (S60->virtualMousePressedKeys != 0) {
- S60->virtualMousePressedKeys |= QS60Data::Select;
+ if (S60->virtualMousePressedKeys & QS60Data::Select) {
return EKeyWasConsumed;
} else {
S60->virtualMousePressedKeys |= QS60Data::Select;
@@ -718,7 +719,8 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
fakeEvent.iModifiers = keyEvent.iModifiers;
fakeEvent.iPosition = cpos;
fakeEvent.iParentPosition = epos;
- HandlePointerEvent(fakeEvent);
+ if(fakeEvent.iType != -1)
+ HandlePointerEvent(fakeEvent);
return EKeyWasConsumed;
}
else {