diff options
author | Michal Klocek <michal.klocek@qt.io> | 2018-11-19 15:49:48 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2019-02-13 11:33:22 +0000 |
commit | 48f5b671a3102df50115e566c01298f3e9106654 (patch) | |
tree | 7e394da055f98f2245ea4f4cbdaed7f85e431326 /src/plugins/platforms | |
parent | 56a8c277546fba6ad45711e95db26c74178ef512 (diff) |
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 <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp | 4 |
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() |