From fd619946be51784dc709363324897be6af144c52 Mon Sep 17 00:00:00 2001 From: Fabian Bumberger Date: Thu, 22 Aug 2013 17:02:05 +0200 Subject: Refactor QQnxWindow This patch does following things: * Remove the root window: First window which is created will serve as a root window * Allow creation of more than one application window (with every app window having an own window group) on one screen * Fixes a bug when reparanting an EGL window Change-Id: I1afd64a813bc084c0893b958aa191d4a25c32b9d Reviewed-by: Matt Hoosier Reviewed-by: Rafael Roquetto --- src/plugins/platforms/qnx/qqnxintegration.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'src/plugins/platforms/qnx/qqnxintegration.cpp') 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 ¶mList 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"); -- cgit v1.2.3