diff options
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.cpp')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 3831d202f3..e684e7598b 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -98,7 +98,12 @@ bool QWindowSystemHelper<QWindowSystemInterface::SynchronousDelivery>::handleEve if (QThread::currentThread() == QGuiApplication::instance()->thread()) { EventType event(args...); // Process the event immediately on the Gui thread and return the accepted state - QGuiApplicationPrivate::processWindowSystemEvent(&event); + if (QWindowSystemInterfacePrivate::eventHandler) { + if (!QWindowSystemInterfacePrivate::eventHandler->sendEvent(&event)) + return false; + } else { + QGuiApplicationPrivate::processWindowSystemEvent(&event); + } return event.eventAccepted; } else { // Post the event on the Qt main thread queue and flush the queue. @@ -644,7 +649,7 @@ QList<QEventPoint> QList<QEventPoint> touchPoints; QEventPoint::States states; - touchPoints.reserve(points.count()); + touchPoints.reserve(points.size()); QList<QWindowSystemInterface::TouchPoint>::const_iterator point = points.constBegin(); QList<QWindowSystemInterface::TouchPoint>::const_iterator end = points.constEnd(); while (point != end) { @@ -1203,7 +1208,7 @@ namespace QTest } } -Q_GUI_EXPORT bool qt_handleTouchEvent(QWindow *window, const QPointingDevice *device, +Q_GUI_EXPORT bool qt_handleTouchEventv2(QWindow *window, const QPointingDevice *device, const QList<QEventPoint> &points, Qt::KeyboardModifiers mods = Qt::NoModifier) { @@ -1211,5 +1216,11 @@ Q_GUI_EXPORT bool qt_handleTouchEvent(QWindow *window, const QPointingDevice *de QWindowSystemInterfacePrivate::toNativeTouchPoints(points, window), mods); } +Q_GUI_EXPORT void qt_handleTouchEvent(QWindow *window, const QPointingDevice *device, + const QList<QEventPoint> &points, + Qt::KeyboardModifiers mods = Qt::NoModifier) +{ + qt_handleTouchEventv2(window, device, points, mods); +} QT_END_NAMESPACE |