summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/platformsupport/glxconvenience/qglxconvenience.cpp5
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/platformsupport/glxconvenience/qglxconvenience.cpp b/src/platformsupport/glxconvenience/qglxconvenience.cpp
index 7dc29fae6d..4225bebf37 100644
--- a/src/platformsupport/glxconvenience/qglxconvenience.cpp
+++ b/src/platformsupport/glxconvenience/qglxconvenience.cpp
@@ -386,5 +386,10 @@ bool qglx_reduceFormat(QSurfaceFormat *format)
return true;
}
+ if (format->stereo()) {
+ format->setStereo(false);
+ return true;
+ }
+
return false;
}
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp
index 8ae83b8084..a8d51d5e8c 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp
@@ -59,6 +59,10 @@ const xcb_visualtype_t *QXcbGlxWindow::createVisual()
if (!scr)
return Q_NULLPTR;
XVisualInfo *visualInfo = qglx_findVisualInfo(DISPLAY_FROM_XCB(scr), scr->screenNumber(), &m_format);
+ if (!visualInfo) {
+ qWarning() << "No XVisualInfo for format" << m_format;
+ return Q_NULLPTR;
+ }
const xcb_visualtype_t *xcb_visualtype = scr->visualForId(visualInfo->visualid);
XFree(visualInfo);
return xcb_visualtype;