summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbintegration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbintegration.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 2ace68036b..f6077316e6 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -192,9 +192,11 @@ QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLCont
screen->connection()->egl_display(), screen->connection());
#elif defined(XCB_USE_DRI2)
return new QDri2Context(context->format(), context->shareHandle());
-#endif
+#else
+ Q_UNUSED(screen);
qWarning("QXcbIntegration: Cannot create platform OpenGL context, none of GLX, EGL, or DRI2 are enabled");
return 0;
+#endif
}
#endif
@@ -207,7 +209,13 @@ bool QXcbIntegration::hasCapability(QPlatformIntegration::Capability cap) const
{
switch (cap) {
case ThreadedPixmaps: return true;
+#if defined(XCB_USE_GLX)
+ case OpenGL: return m_connections.at(0)->hasGLX();
+#elif defined(XCB_USE_EGL) || defined(XCB_USE_DRI2)
case OpenGL: return true;
+#else
+ case OpenGL: return false;
+#endif
case ThreadedOpenGL: return false;
case WindowMasks: return true;
default: return QPlatformIntegration::hasCapability(cap);