From abc29084fadf9c7d936fca55d02323090d9986cc Mon Sep 17 00:00:00 2001 From: Roger Maclean Date: Wed, 29 Oct 2014 11:06:20 -0400 Subject: 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 --- src/plugins/platforms/qnx/qqnxwindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/qnx/qqnxwindow.cpp') 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; -- cgit v1.2.3