summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/qnx')
-rw-r--r--src/plugins/platforms/qnx/qqnxrasterwindow.cpp9
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp7
2 files changed, 14 insertions, 2 deletions
diff --git a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
index b075690e3d..7f11de228e 100644
--- a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
@@ -178,7 +178,7 @@ 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 = window()->parent() ? QSize(1,1) : window()->size();
+ const QSize windowSize = window()->parent() ? QSize(0,0) : window()->size();
if (windowSize != bufferSize())
setBufferSize(windowSize);
}
@@ -194,6 +194,13 @@ void QQnxRasterWindow::resetBuffers()
m_currentBufferIndex = -1;
m_previousDirty = QRegion();
m_scrolled = QRegion();
+ if (window()->parent() && bufferSize() == QSize(1,1)) {
+ // If we have a parent then we're not really rendering. But if we don't render we'll
+ // be invisible and any children won't show up. This should be harmless since we're
+ // rendering into a 1x1 window that has transparency set to discard.
+ renderBuffer();
+ post(QRegion(0,0,1,1));
+ }
}
void QQnxRasterWindow::blitPreviousToCurrent(const QRegion &region, int dx, int dy, bool flush)
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index e04f16db92..f4e6ca9804 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -386,7 +386,12 @@ void QQnxWindow::setBufferSize(const QSize &size)
// Set the transparency. According to QNX technical support, setting the window
// transparency property should always be done *after* creating the window
// buffers in order to guarantee the property is paid attention to.
- if (window()->requestedFormat().alphaBufferSize() == 0) {
+ if (size.isEmpty()) {
+ // We can't create 0x0 buffers and instead make them 1x1. But to allow these windows to
+ // still be 'visible' (thus allowing their children to be visible), we need to allow
+ // them to be posted but still not show up.
+ val[0] = SCREEN_TRANSPARENCY_DISCARD;
+ } else if (window()->requestedFormat().alphaBufferSize() == 0) {
// To avoid overhead in the composition manager, disable blending
// when the underlying window buffer doesn't have an alpha channel.
val[0] = SCREEN_TRANSPARENCY_NONE;