From 48f5b671a3102df50115e566c01298f3e9106654 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Mon, 19 Nov 2018 15:49:48 +0100 Subject: Add native handle for context in offscreen plugin Offscreen plugin can be compiled with x11 support. In case of glx add missing native handle for context. This fixes crashes of running web engine with offscreenplugin (with glx support). Task-number: QTBUG-63346 Change-Id: Ia717ad2551536fbfdfb6633e506704a3ebe42a2b Reviewed-by: Laszlo Agocs --- src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/plugins/platforms/offscreen') 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() -- cgit v1.2.3