summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxwindow.cpp
diff options
context:
space:
mode:
authorRoger Maclean <rmaclean@qnx.com>2014-10-29 11:06:20 -0400
committerJames McDonnell <jmcdonnell@qnx.com>2016-07-06 18:15:48 +0000
commitabc29084fadf9c7d936fca55d02323090d9986cc (patch)
treed5387a54cacb59fffb3de9a2bdd4d228c1b41ac1 /src/plugins/platforms/qnx/qqnxwindow.cpp
parent1575f2fc3cf74035716f2dc0c31442d77f136561 (diff)
QNX: Ensure invisible 1x1 raster windows are posted.
Non-top level raster windows still have screen windows associated with them though they are not intended to be visible. This causes problems if they have children (as they do when QGLWidgets are used) since their children will also not be visible. So, if we have a window with a parent, force them to post but set the transparency to discard so they remain invisible. This allows the example hellogl_es2 to run correctly. Change-Id: I67e24dc59b29ce789376498c2477349fa50020e1 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxwindow.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index 4dc1248bd1..da2929d4c0 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;