From 5414d372d42278b146ce1cdf1096c4e91e7039ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 9 Apr 2018 15:27:00 +0200 Subject: iOS: Send window-system event also when embedded in native iOS app The iOS event dispatcher has been split into two; one dealing with the QPA event processing, which we should always do, and one dealing with the longjumping that we do when running the user's main on a separate stack. Change-Id: I1f819db33c608aad130ff23cbbadcf84363a32d2 Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/ios/qioseventdispatcher.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/ios/qioseventdispatcher.h') diff --git a/src/plugins/platforms/ios/qioseventdispatcher.h b/src/plugins/platforms/ios/qioseventdispatcher.h index 62133b9510..1f4c78dc74 100644 --- a/src/plugins/platforms/ios/qioseventdispatcher.h +++ b/src/plugins/platforms/ios/qioseventdispatcher.h @@ -49,18 +49,29 @@ class QIOSEventDispatcher : public QEventDispatcherCoreFoundation Q_OBJECT public: + static QIOSEventDispatcher* create(); + bool processPostedEvents() override; + +protected: explicit QIOSEventDispatcher(QObject *parent = 0); +}; + +class QIOSJumpingEventDispatcher : public QIOSEventDispatcher +{ + Q_OBJECT +public: + QIOSJumpingEventDispatcher(QObject *parent = 0); bool processEvents(QEventLoop::ProcessEventsFlags flags) override; - bool processPostedEvents() override; + // Public since we can't friend Objective-C methods void handleRunLoopExit(CFRunLoopActivity activity); void interruptEventLoopExec(); private: uint m_processEventLevel; - RunLoopObserver m_runLoopExitObserver; + RunLoopObserver m_runLoopExitObserver; }; QT_END_NAMESPACE -- cgit v1.2.3