wayland: fix broken opengl screenshots on mutter

This commit is contained in:
ninja- 2020-06-30 19:41:52 +02:00
parent d86babb14e
commit 2227df83f0

View File

@ -175,6 +175,14 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,
u->samples = getEGLConfigAttrib(n, EGL_SAMPLES); u->samples = getEGLConfigAttrib(n, EGL_SAMPLES);
u->doublebuffer = GLFW_TRUE; 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; u->handle = (uintptr_t) n;
usableCount++; usableCount++;
} }