summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index e58403ad0..a8ee9a43a 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -399,8 +399,13 @@ bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface)
QWaylandEglWindow *window = static_cast<QWaylandEglWindow *>(surface);
EGLSurface eglSurface = window->eglSurface();
- if (!window->needToUpdateContentFBO() && (eglSurface != EGL_NO_SURFACE && eglGetCurrentContext() == m_context && eglGetCurrentSurface(EGL_DRAW) == eglSurface))
+ if (!window->needToUpdateContentFBO() && (eglSurface != EGL_NO_SURFACE)) {
+ if (!eglMakeCurrent(m_eglDisplay, eglSurface, eglSurface, m_context)) {
+ qWarning("QWaylandGLContext::makeCurrent: eglError: %x, this: %p \n", eglGetError(), this);
+ return false;
+ }
return true;
+ }
if (window->isExposed())
window->setCanResize(false);