From c79d7f56dd0eacfea761984b49a493f5a730401b Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 22 Jul 2021 13:00:06 +0300 Subject: [PATCH] kwineffects: Disable OpenGLContext sharing check in EffectQuickView On Wayland, QOpenGLContext::shareContext() will always return null even if the newly created context has a share context. --- src/libkwineffects/kwineffectquickview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libkwineffects/kwineffectquickview.cpp b/src/libkwineffects/kwineffectquickview.cpp index 15830f17c2..6fc19d71a2 100644 --- a/src/libkwineffects/kwineffectquickview.cpp +++ b/src/libkwineffects/kwineffectquickview.cpp @@ -101,7 +101,8 @@ EffectQuickView::EffectQuickView(QObject *parent, ExportMode exportMode) d->m_renderControl->initialize(d->m_glcontext.data()); d->m_glcontext->doneCurrent(); - if (!d->m_glcontext->shareContext()) { + // On Wayland, opengl contexts are implicitly shared. + if (!effects->waylandDisplay() && !d->m_glcontext->shareContext()) { qCDebug(LIBKWINEFFECTS) << "Failed to create a shared context, falling back to raster rendering"; // still render via GL, but blit for presentation d->m_useBlit = true;