From: Alexandros Frantzis alexandros.frantzis@collabora.com
Many applications request and use GL configs with alpha, but assume that the windowing system will present their surfaces opaquely. Wayland compositors normally respect the alpha channel, which leads to unwanted translucency effects for such applications, so we use the EGL_EXT_present_opaque extension to avoid this.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57800 --- dlls/winewayland.drv/opengl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/winewayland.drv/opengl.c b/dlls/winewayland.drv/opengl.c index b8b673f398a..d9a83d49b3e 100644 --- a/dlls/winewayland.drv/opengl.c +++ b/dlls/winewayland.drv/opengl.c @@ -194,6 +194,7 @@ static struct wayland_gl_drawable *wayland_gl_drawable_create(HWND hwnd, int for struct wayland_gl_drawable *gl; int client_width, client_height; RECT client_rect = {0}; + const EGLint attribs[] = {EGL_PRESENT_OPAQUE_EXT, EGL_TRUE, EGL_NONE};
TRACE("hwnd=%p format=%d\n", hwnd, format);
@@ -223,7 +224,7 @@ static struct wayland_gl_drawable *wayland_gl_drawable_create(HWND hwnd, int for }
gl->surface = p_eglCreateWindowSurface(egl_display, egl_config_for_format(format), - gl->wl_egl_window, NULL); + gl->wl_egl_window, attribs); if (!gl->surface) { ERR("Failed to create EGL surface\n"); @@ -1397,6 +1398,7 @@ static void init_opengl(void) REQUIRE_EXT(EGL_KHR_create_context); REQUIRE_EXT(EGL_KHR_create_context_no_error); REQUIRE_EXT(EGL_KHR_no_config_context); + REQUIRE_EXT(EGL_EXT_present_opaque); #undef REQUIRE_EXT
has_egl_ext_pixel_format_float = has_extension(egl_exts, "EGL_EXT_pixel_format_float");