xcb: Remove need for QXCBScreen to resolve QXcbGlIntegration
Change-Id: I9de4f47bfdf88c92959f210e05c1fc1e8a459cde Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
parent
1e39b39ddb
commit
590ac717a2
@ -268,8 +268,7 @@ QPlatformWindow *QXcbIntegration::createForeignWindow(QWindow *window, WId nativ
|
|||||||
#ifndef QT_NO_OPENGL
|
#ifndef QT_NO_OPENGL
|
||||||
QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
|
QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
|
||||||
{
|
{
|
||||||
QXcbScreen *screen = static_cast<QXcbScreen *>(context->screen()->handle());
|
QXcbGlIntegration *glIntegration = m_connection->glIntegration();
|
||||||
QXcbGlIntegration *glIntegration = screen->connection()->glIntegration();
|
|
||||||
if (!glIntegration) {
|
if (!glIntegration) {
|
||||||
qWarning("QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled");
|
qWarning("QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user