diff --git a/src/egl_context.c b/src/egl_context.c index b9736fd16..9189a66c9 100644 --- a/src/egl_context.c +++ b/src/egl_context.c @@ -175,6 +175,14 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig, u->samples = getEGLConfigAttrib(n, EGL_SAMPLES); u->doublebuffer = GLFW_TRUE; +#if defined(_GLFW_WAYLAND) + // Avoid using transparent buffer on Wayland if transparency is not requested. + // Otherwise mutter will fail to properly screenshot OpenGL content. + if (u->alphaBits > 0 && !desired->transparent) { + continue; + } +#endif // _GLFW_WAYLAND + u->handle = (uintptr_t) n; usableCount++; }