From f669fc9749fce770420e1efece893bb2724a003c Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Wed, 12 Sep 2018 10:28:03 +0200 Subject: Workaround for crash in QWaylandGlContext::makeCurrent QOpenGLContext::makeCurrent no longer sets the current context before calling the platform function. Task-number: QTBUG-70511 Change-Id: I67766d43b1142b0742f655b5c2728f4c87fbfb5f Reviewed-by: Paul Olav Tvete Reviewed-by: Laszlo Agocs --- src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp index 4f2aa8af5..1467d8c9a 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp @@ -422,6 +422,9 @@ bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface) return false; } + //### setCurrentContext will be called in QOpenGLContext::makeCurrent after this function + // returns, but that's too late, as we need a current context in order to bind the content FBO. + QOpenGLContextPrivate::setCurrentContext(context()); window->bindContentFBO(); return true; -- cgit v1.2.3