summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
diff options
context:
space:
mode:
authorFabian Bumberger <fbumberger@rim.com>2013-08-22 17:02:05 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-11 04:24:57 +0100
commitfd619946be51784dc709363324897be6af144c52 (patch)
tree4add7162e8fae66840e73267935ea4a131997dfa /src/plugins/platforms/qnx/qqnxrasterwindow.cpp
parentd4ade9d4ef785a96f0bd1a89acfdba8ec09324f6 (diff)
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 <matt.hoosier@garmin.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxrasterwindow.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxrasterwindow.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
index 16ff9d7519..1f974b268d 100644
--- a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
@@ -54,8 +54,8 @@
QT_BEGIN_NAMESPACE
-QQnxRasterWindow::QQnxRasterWindow(QWindow *window, screen_context_t context) :
- QQnxWindow(window, context),
+QQnxRasterWindow::QQnxRasterWindow(QWindow *window, screen_context_t context, bool needRootWindow) :
+ QQnxWindow(window, context, needRootWindow),
m_currentBufferIndex(-1),
m_previousBufferIndex(-1)
{
@@ -115,9 +115,6 @@ void QQnxRasterWindow::post(const QRegion &dirty)
// Save modified region and clear scrolled region
m_previousDirty = dirty;
m_scrolled = QRegion();
- // Notify screen that window posted
- if (screen() != 0)
- screen()->onWindowPost(this);
if (m_cover)
m_cover->updateCover();
@@ -169,6 +166,15 @@ QQnxBuffer &QQnxRasterWindow::renderBuffer()
return m_buffers[m_currentBufferIndex];
}
+void QQnxRasterWindow::adjustBufferSize()
+{
+ // When having a raster window we don't need any buffers, since
+ // Qt will draw to the parent TLW backing store.
+ const QSize windowSize = m_parentWindow ? QSize(1,1) : window()->size();
+ if (windowSize != bufferSize())
+ setBufferSize(windowSize);
+}
+
int QQnxRasterWindow::pixelFormat() const
{
return screen()->nativeFormat();