diff options
Diffstat (limited to 'src/plugins/platforms/qnx')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxnativeinterface.cpp | 8 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxnativeinterface.h | 1 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxscreen.cpp | 5 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxscreen.h | 4 |
4 files changed, 17 insertions, 1 deletions
diff --git a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp index e147ca72e5..4dd3444832 100644 --- a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp +++ b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp @@ -62,4 +62,12 @@ void *QQnxNativeInterface::nativeResourceForWindow(const QByteArray &resource, Q return 0; } +void *QQnxNativeInterface::nativeResourceForScreen(const QByteArray &resource, QScreen *screen) +{ + if (resource == "QObject*" && screen) + return static_cast<QObject*>(static_cast<QQnxScreen*>(screen->handle())); + + return 0; +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxnativeinterface.h b/src/plugins/platforms/qnx/qqnxnativeinterface.h index d84df205e5..6692da2576 100644 --- a/src/plugins/platforms/qnx/qqnxnativeinterface.h +++ b/src/plugins/platforms/qnx/qqnxnativeinterface.h @@ -50,6 +50,7 @@ class QQnxNativeInterface : public QPlatformNativeInterface { public: void *nativeResourceForWindow(const QByteArray &resource, QWindow *window); + void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen); }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp index d940b35861..69e672aefc 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.cpp +++ b/src/plugins/platforms/qnx/qqnxscreen.cpp @@ -573,8 +573,10 @@ void QQnxScreen::addUnderlayWindow(screen_window_t window) void QQnxScreen::removeOverlayOrUnderlayWindow(screen_window_t window) { const int numRemoved = m_overlays.removeAll(window) + m_underlays.removeAll(window); - if (numRemoved > 0) + if (numRemoved > 0) { updateHierarchy(); + Q_EMIT foreignWindowClosed(window); + } } void QQnxScreen::newWindowCreated(void *window) @@ -608,6 +610,7 @@ void QQnxScreen::newWindowCreated(void *window) addUnderlayWindow(windowHandle); else addOverlayWindow(windowHandle); + Q_EMIT foreignWindowCreated(windowHandle); } } } diff --git a/src/plugins/platforms/qnx/qqnxscreen.h b/src/plugins/platforms/qnx/qqnxscreen.h index e498d27c14..fd97e2e58f 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.h +++ b/src/plugins/platforms/qnx/qqnxscreen.h @@ -98,6 +98,10 @@ public: QPlatformCursor *cursor() const; +Q_SIGNALS: + void foreignWindowCreated(void *window); + void foreignWindowClosed(void *window); + public Q_SLOTS: void setRotation(int rotation); void newWindowCreated(void *window); |