summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-05-18 13:32:39 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-05-18 13:32:39 (GMT)
commit6cc1e0106845a0dfe9433c4413b3c064c73ccfe2 (patch)
treea0372fb3e03000dc1e1f93a4154adecd70fd5119 /src/gui/kernel/qapplication.cpp
parent86edc526684d80e405bcd1c63b5a314b70408679 (diff)
parent537243d70de1474cf234880b215c75e83e80abcd (diff)
downloadQt-6cc1e0106845a0dfe9433c4413b3c064c73ccfe2.zip
Qt-6cc1e0106845a0dfe9433c4413b3c064c73ccfe2.tar.gz
Qt-6cc1e0106845a0dfe9433c4413b3c064c73ccfe2.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-multitouch
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r--src/gui/kernel/qapplication.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 204cff6..b142f2e 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -2874,7 +2874,8 @@ QWidget *QApplicationPrivate::pickMouseReceiver(QWidget *candidate, const QPoint
*/
bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event,
QWidget *alienWidget, QWidget *nativeWidget,
- QWidget **buttonDown, QPointer<QWidget> &lastMouseReceiver)
+ QWidget **buttonDown, QPointer<QWidget> &lastMouseReceiver,
+ bool spontaneous)
{
Q_ASSERT(receiver);
Q_ASSERT(event);
@@ -2927,7 +2928,11 @@ bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event,
// We need this quard in case someone opens a modal dialog / popup. If that's the case
// leaveAfterRelease is set to null, but we shall not update lastMouseReceiver.
const bool wasLeaveAfterRelease = leaveAfterRelease != 0;
- bool result = QApplication::sendSpontaneousEvent(receiver, event);
+ bool result;
+ if (spontaneous)
+ result = QApplication::sendSpontaneousEvent(receiver, event);
+ else
+ result = QApplication::sendEvent(receiver, event);
if (!graphicsWidget && leaveAfterRelease && event->type() == QEvent::MouseButtonRelease
&& !event->buttons() && QWidget::mouseGrabber() != leaveAfterRelease) {