mirror of
https://github.com/glfw/glfw.git
synced 2025-10-03 13:20:58 +00:00
wayland: fix broken opengl screenshots on mutter
This commit is contained in:
parent
d86babb14e
commit
2227df83f0
@ -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++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user