diff options
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/ios/qioseventdispatcher.h | 1 | ||||
-rw-r--r-- | src/plugins/platforms/ios/qioseventdispatcher.mm | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qioseventdispatcher.h b/src/plugins/platforms/ios/qioseventdispatcher.h index fdaa7e68fe..e8ea1cc28b 100644 --- a/src/plugins/platforms/ios/qioseventdispatcher.h +++ b/src/plugins/platforms/ios/qioseventdispatcher.h @@ -46,6 +46,7 @@ public: explicit QIOSEventDispatcher(QObject *parent = 0); bool processEvents(QEventLoop::ProcessEventsFlags flags) Q_DECL_OVERRIDE; + bool processPostedEvents() Q_DECL_OVERRIDE; void handleRunLoopExit(CFRunLoopActivity activity); diff --git a/src/plugins/platforms/ios/qioseventdispatcher.mm b/src/plugins/platforms/ios/qioseventdispatcher.mm index bd4b8778ed..0e9f176487 100644 --- a/src/plugins/platforms/ios/qioseventdispatcher.mm +++ b/src/plugins/platforms/ios/qioseventdispatcher.mm @@ -39,6 +39,8 @@ #include <QtCore/private/qcoreapplication_p.h> #include <QtCore/private/qthread_p.h> +#include <qpa/qwindowsysteminterface.h> + #import <Foundation/NSArray.h> #import <Foundation/NSString.h> #import <Foundation/NSProcessInfo.h> @@ -461,6 +463,25 @@ bool __attribute__((returns_twice)) QIOSEventDispatcher::processEvents(QEventLoo return processedEvents; } +/*! + Override of the CoreFoundation posted events runloop source callback + so that we can send window system (QPA) events in addition to sending + normal Qt events. +*/ +bool QIOSEventDispatcher::processPostedEvents() +{ + // Don't send window system events if the base CF dispatcher has determined + // that events should not be sent for this pass of the runloop source. + if (!QEventDispatcherCoreFoundation::processPostedEvents()) + return false; + + qEventDispatcherDebug() << "Sending window system events for " << m_processEvents.flags; qIndent(); + QWindowSystemInterface::sendWindowSystemEvents(m_processEvents.flags); + qUnIndent(); + + return true; +} + void QIOSEventDispatcher::handleRunLoopExit(CFRunLoopActivity activity) { Q_UNUSED(activity); |