diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp index 06a9bd2a4c..38d06a4131 100644 --- a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp +++ b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp @@ -41,6 +41,7 @@ #include #include +#include #include #include @@ -228,6 +229,9 @@ QOffscreenX11GLXContext::QOffscreenX11GLXContext(QOffscreenX11Info *x11, QOpenGL d->window = createDummyWindow(x11, visualInfo); XFree(visualInfo); } + if (d->context) + context->setNativeHandle(QVariant::fromValue(QGLXNativeContext(d->context))); + } QOffscreenX11GLXContext::~QOffscreenX11GLXContext()