diff options
Diffstat (limited to '0004-fix-broken-opengl-screenshots-on-mutter.patch')
-rw-r--r-- | 0004-fix-broken-opengl-screenshots-on-mutter.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/0004-fix-broken-opengl-screenshots-on-mutter.patch b/0004-fix-broken-opengl-screenshots-on-mutter.patch new file mode 100644 index 000000000000..f51e5c901924 --- /dev/null +++ b/0004-fix-broken-opengl-screenshots-on-mutter.patch @@ -0,0 +1,33 @@ +From ee84b919ad1f2d99a6805f3c00d7550908e8bd7b Mon Sep 17 00:00:00 2001 +From: ninja- <ninja-@users.noreply.github.com> +Date: Tue, 30 Jun 2020 19:41:52 +0200 +Subject: [PATCH 3/3] fix broken opengl screenshots on mutter + +(admicos) This breaks more than just screenshots. On sway, the window is +rendered half transparent. And we do not want that. +--- + src/egl_context.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/egl_context.c b/src/egl_context.c +index 6288fb7c..106da4f3 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++; + } +-- +2.32.0 + |