summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-09-12 10:28:03 +0200
committerPaul Olav Tvete <paul.tvete@qt.io>2018-09-12 09:16:26 +0000
commitf669fc9749fce770420e1efece893bb2724a003c (patch)
treeef6aa374f70b75ece859ee175508e4fcdee0b5b5
parent122123bfa4a65b04884f1d930900cb342fb7741c (diff)
Workaround for crash in QWaylandGlContext::makeCurrentv5.12.0-alpha1
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 <paul.tvete@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index 4f2aa8af..1467d8c9 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;