summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qglxintegration.cpp
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-07-07 13:28:21 +0200
committerAndras Becsi <andras.becsi@digia.com>2014-07-07 16:18:24 +0200
commit16baadab11341e671150932fd28cff466a4fc041 (patch)
treecef621459f4c1b59a345da0434a7b376dda363de /src/plugins/platforms/xcb/qglxintegration.cpp
parent56ce6ba9792778e7d6fa1194b41e282633ff81c1 (diff)
Add support for querying "glxconfig" from native interface
This makes it possible to retrieve the GLXFBConfig used by Qt to create the GLXContext. QtWebEngine on desktop needs this so that Chromium can use the same config as Qt to eliminate BadMatch errors. Change-Id: If18c0937b5af3e457ddbfda035e5d652230211c6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qglxintegration.cpp')
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp
index df929c4b61..45ccd9929e 100644
--- a/src/plugins/platforms/xcb/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -166,6 +166,7 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat
const QVariant &nativeHandle)
: QPlatformOpenGLContext()
, m_screen(screen)
+ , m_config(0)
, m_context(0)
, m_shareContext(0)
, m_format(format)
@@ -190,6 +191,7 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share)
m_shareContext = static_cast<const QGLXContext*>(share)->glxContext();
GLXFBConfig config = qglx_findConfig(DISPLAY_FROM_XCB(screen),screen->screenNumber(),m_format);
+ m_config = config;
XVisualInfo *visualInfo = 0;
Window window = 0; // Temporary window used to query OpenGL context
@@ -399,6 +401,8 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share, const
qWarning("QGLXContext: Multiple configs for FBConfig ID %d", configId);
config = configs[0];
+ // Store the config.
+ m_config = config;
}
Q_ASSERT(vinfo || config);