summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxintegration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxintegration.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp
index 36a2194b56..52f836abbe 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.cpp
+++ b/src/plugins/platforms/qnx/qqnxintegration.cpp
@@ -1,6 +1,6 @@
/***************************************************************************
**
-** Copyright (C) 2011 - 2012 Research In Motion
+** Copyright (C) 2011 - 2013 BlackBerry Limited. All rights reserved.
** Contact: http://www.qt-project.org/legal
**
** This file is part of the plugins of the Qt Toolkit.
@@ -122,6 +122,17 @@ static inline QQnxIntegration::Options parseOptions(const QStringList &paramList
if (!paramList.contains(QLatin1String("no-fullscreen"))) {
options |= QQnxIntegration::FullScreenApplication;
}
+
+// On Blackberry the first window is treated as a root window
+#ifdef Q_OS_BLACKBERRY
+ if (!paramList.contains(QLatin1String("no-rootwindow"))) {
+ options |= QQnxIntegration::RootWindow;
+ }
+#else
+ if (paramList.contains(QLatin1String("rootwindow"))) {
+ options |= QQnxIntegration::RootWindow;
+ }
+#endif
return options;
}
@@ -323,9 +334,10 @@ bool QQnxIntegration::hasCapability(QPlatformIntegration::Capability cap) const
{
qIntegrationDebug() << Q_FUNC_INFO;
switch (cap) {
+ case MultipleWindows:
case ThreadedPixmaps:
return true;
-#if defined(QT_OPENGL_ES)
+#if !defined(QT_NO_OPENGL)
case OpenGL:
case ThreadedOpenGL:
case BufferQueueingOpenGL:
@@ -340,12 +352,13 @@ QPlatformWindow *QQnxIntegration::createPlatformWindow(QWindow *window) const
{
qIntegrationDebug() << Q_FUNC_INFO;
QSurface::SurfaceType surfaceType = window->surfaceType();
+ const bool needRootWindow = options() & RootWindow;
switch (surfaceType) {
case QSurface::RasterSurface:
- return new QQnxRasterWindow(window, m_screenContext);
+ return new QQnxRasterWindow(window, m_screenContext, needRootWindow);
#if !defined(QT_NO_OPENGL)
case QSurface::OpenGLSurface:
- return new QQnxEglWindow(window, m_screenContext);
+ return new QQnxEglWindow(window, m_screenContext, needRootWindow);
#endif
default:
qFatal("QQnxWindow: unsupported window API");