diff options
author | Jan Arne Petersen <jan.petersen@kdab.com> | 2013-10-29 10:10:32 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-05 11:27:10 +0100 |
commit | 6802f34bedca25e05d1eda962b268b1936dd4d62 (patch) | |
tree | 492cf90e2c595d014b09009fb9c8b32a4634553f /src/plugins/platforms/qnx/qqnxscreeneventhandler.h | |
parent | 161e8653c342278a4881da952ea723b107df93c0 (diff) |
Process screen events in the main thread
Screen events are still read in the screen event thread but are
processed in the main thread to make it possible to support
QAbstractNativeEventFilter for screen events later.
Implementation is similar to the xcb platform plugin.
Change-Id: I7bade3e13e51c6d70bb608727a93bbd3aabc5d47
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxscreeneventhandler.h')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxscreeneventhandler.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.h b/src/plugins/platforms/qnx/qqnxscreeneventhandler.h index 7ceb32fcec..1fdb2c83cd 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.h +++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.h @@ -49,6 +49,9 @@ QT_BEGIN_NAMESPACE class QQnxIntegration; +#if defined(QQNX_SCREENEVENTTHREAD) +class QQnxScreenEventThread; +#endif class QQnxScreenEventHandler : public QObject { @@ -61,10 +64,19 @@ public: static void injectKeyboardEvent(int flags, int sym, int mod, int scan, int cap); +#if defined(QQNX_SCREENEVENTTHREAD) + void setScreenEventThread(QQnxScreenEventThread *eventThread); +#endif + Q_SIGNALS: void newWindowCreated(void *window); void windowClosed(void *window); +#if defined(QQNX_SCREENEVENTTHREAD) +private Q_SLOTS: + void processEventsFromScreenThread(); +#endif + private: void handleKeyboardEvent(screen_event_t event); void handlePointerEvent(screen_event_t event); @@ -87,6 +99,9 @@ private: screen_window_t m_lastMouseWindow; QTouchDevice *m_touchDevice; QWindowSystemInterface::TouchPoint m_touchPoints[MaximumTouchPoints]; +#if defined(QQNX_SCREENEVENTTHREAD) + QQnxScreenEventThread *m_eventThread; +#endif }; QT_END_NAMESPACE |