diff --git a/plugins/qpa/abstractplatformcontext.h b/plugins/qpa/abstractplatformcontext.h --- a/plugins/qpa/abstractplatformcontext.h +++ b/plugins/qpa/abstractplatformcontext.h @@ -53,7 +53,7 @@ return m_config; } bool bindApi(); - EGLContext context() const { + EGLContext eglContext() const { return m_context; } void createContext(EGLContext shareContext = EGL_NO_CONTEXT); diff --git a/plugins/qpa/platformcontextwayland.cpp b/plugins/qpa/platformcontextwayland.cpp --- a/plugins/qpa/platformcontextwayland.cpp +++ b/plugins/qpa/platformcontextwayland.cpp @@ -44,7 +44,7 @@ return false; } } - return eglMakeCurrent(eglDisplay(), s, s, context()); + return eglMakeCurrent(eglDisplay(), s, s, eglContext()); } bool PlatformContextWayland::isSharing() const diff --git a/plugins/qpa/sharingplatformcontext.cpp b/plugins/qpa/sharingplatformcontext.cpp --- a/plugins/qpa/sharingplatformcontext.cpp +++ b/plugins/qpa/sharingplatformcontext.cpp @@ -48,7 +48,7 @@ bool SharingPlatformContext::makeCurrent(QPlatformSurface *surface) { Window *window = static_cast(surface); - if (eglMakeCurrent(eglDisplay(), m_surface, m_surface, context())) { + if (eglMakeCurrent(eglDisplay(), m_surface, m_surface, eglContext())) { window->bindContentFBO(); return true; } @@ -74,7 +74,7 @@ qCDebug(KWIN_QPA) << "SwapBuffers called but there is no ShellClient"; return; } - makeCurrent(surface); + context()->makeCurrent(surface->surface()); glFlush(); c->setInternalFramebufferObject(window->swapFBO()); window->bindContentFBO();