From 5ba887ff6817ea0edb8201b625cf38d7a0e8e19c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 10 Sep 2022 11:57:18 +0530 Subject: [PATCH] Wayland: Fix for bug in NVIDIA drivers that prevents transparency working Fixes #5479 --- docs/changelog.rst | 2 ++ glfw/egl_context.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 582d1e95e..236a38062 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -44,6 +44,8 @@ Detailed list of changes - Sessions: Allow controlling which OS Window is active via the ``focus_os_window`` directive +- Wayland: Fix for bug in NVIDIA drivers that prevents transparency working (:iss:`5479`) + 0.26.2 [2022-09-05] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/glfw/egl_context.c b/glfw/egl_context.c index a714a12dc..6adcea05b 100644 --- a/glfw/egl_context.c +++ b/glfw/egl_context.c @@ -600,8 +600,11 @@ bool _glfwCreateContextEGL(_GLFWwindow* window, if (_glfw.egl.KHR_gl_colorspace) setAttrib(EGL_GL_COLORSPACE_KHR, EGL_GL_COLORSPACE_SRGB_KHR); } - if (_glfw.egl.EXT_present_opaque) - setAttrib(EGL_PRESENT_OPAQUE_EXT, !fbconfig->transparent); + // Disabled because it prevents transparency from working on NVIDIA drivers under Wayland + // https://github.com/kovidgoyal/kitty/issues/5479 + // We anyway dont use the alpha bits for anything. + /* if (_glfw.egl.EXT_present_opaque) */ + /* setAttrib(EGL_PRESENT_OPAQUE_EXT, !fbconfig->transparent); */ setAttrib(EGL_NONE, EGL_NONE);