diff options
-rw-r--r-- | src/plugins/platforms/qnx/qqnxintegration.cpp | 6 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxintegration.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp | 5 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp index d35ec935fd..e594ea952d 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.cpp +++ b/src/plugins/platforms/qnx/qqnxintegration.cpp @@ -518,4 +518,10 @@ QQnxScreen *QQnxIntegration::primaryDisplay() const return m_screens.first(); } +bool QQnxIntegration::supportsNavigatorEvents() const +{ + // If QQNX_PPS or Q_OS_BLACKBERRY is defined then we have navigator + return m_navigator != 0; +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxintegration.h b/src/plugins/platforms/qnx/qqnxintegration.h index 441e2c9d68..97a5e631e8 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.h +++ b/src/plugins/platforms/qnx/qqnxintegration.h @@ -98,6 +98,8 @@ public: void moveToScreen(QWindow *window, int screen); + bool supportsNavigatorEvents() const; + QAbstractEventDispatcher *guiThreadEventDispatcher() const; QPlatformFontDatabase *fontDatabase() const { return m_fontDatabase; } diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp index d8712bf569..8b41465add 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp +++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp @@ -276,6 +276,11 @@ void QQnxScreenEventHandler::handlePointerEvent(screen_event_t event) qScreenEventDebug() << Q_FUNC_INFO << "Qt enter, w=" << w; } } + + // If we don't have a navigator, we don't get activation events. + if (buttonState && w && w != QGuiApplication::focusWindow() && !m_qnxIntegration->supportsNavigatorEvents()) + QWindowSystemInterface::handleWindowActivated(w); + m_lastMouseWindow = qnxWindow; // Apply scaling to wheel delta and invert value for Qt. We'll probably want to scale |