summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-11-29 15:59:32 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-11-29 15:59:34 +0100
commit777cdb00e704b987ad19bf842088a754cf7e6525 (patch)
treeb8f2356d68e293c591c9be86113ed46478867e0b /src/plugins/platforms/qnx/qqnxnativeinterface.cpp
parentdc9e32caeda0278658befb8bb6e944986c021620 (diff)
parentaf1dbfd2239c7834187f3a702fb2029dc78d4526 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxnativeinterface.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxnativeinterface.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
index 6e7fc35a82..e468b051cd 100644
--- a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
+++ b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
@@ -54,11 +54,13 @@ QT_BEGIN_NAMESPACE
void *QQnxNativeInterface::nativeResourceForWindow(const QByteArray &resource, QWindow *window)
{
if (resource == "windowGroup" && window && window->screen()) {
- const QQnxScreen * const screen = static_cast<QQnxScreen *>(window->screen()->handle());
+ QQnxScreen * const screen = static_cast<QQnxScreen *>(window->screen()->handle());
if (screen) {
+ screen_window_t screenWindow = reinterpret_cast<screen_window_t>(window->winId());
+ QQnxWindow *qnxWindow = screen->findWindow(screenWindow);
// We can't just call data() instead of constData() here, since that would detach
// and the lifetime of the char * would not be long enough. Therefore the const_cast.
- return const_cast<char *>(screen->rootWindow()->groupName().constData());
+ return qnxWindow ? const_cast<char *>(qnxWindow->groupName().constData()) : 0;
}
}