summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp')
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp4
1 files changed, 4 insertions, 0 deletions
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 <QByteArray>
#include <QOpenGLContext>
+#include <QtPlatformHeaders/QGLXNativeContext>
#include <X11/Xlib.h>
#include <GL/glx.h>
@@ -228,6 +229,9 @@ QOffscreenX11GLXContext::QOffscreenX11GLXContext(QOffscreenX11Info *x11, QOpenGL
d->window = createDummyWindow(x11, visualInfo);
XFree(visualInfo);
}
+ if (d->context)
+ context->setNativeHandle(QVariant::fromValue<QGLXNativeContext>(QGLXNativeContext(d->context)));
+
}
QOffscreenX11GLXContext::~QOffscreenX11GLXContext()