From 0073ee29da7dc1bfc3cc477206791056924adcbb Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Tue, 9 May 2023 18:10:34 +0800 Subject: [PATCH] gdkglcontext-win32-wgl.c: Always request alpha bits ...when we are using wglChoosePixelFormatARHB(). This ensures that we hvae a HDC with a pixel format that will really support alpha bits, as we did for the traditional ChoosePixelFormat(). Thanks to Patrick Zacharias for testing and pointing things out. --- gdk/win32/gdkglcontext-win32-wgl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdk/win32/gdkglcontext-win32-wgl.c b/gdk/win32/gdkglcontext-win32-wgl.c index 3721d7136e..fdc8e50e6e 100644 --- a/gdk/win32/gdkglcontext-win32-wgl.c +++ b/gdk/win32/gdkglcontext-win32-wgl.c @@ -171,6 +171,9 @@ get_wgl_pfd (HDC hdc, pixelAttribs[i++] = WGL_COLOR_BITS_ARB; pixelAttribs[i++] = colorbits; + pixelAttribs[i++] = WGL_ALPHA_BITS_ARB; + pixelAttribs[i++] = 8; + /* end of "Update PIXEL_ATTRIBUTES above if any groups are added here!" */ pixelAttribs[i++] = 0; /* end of pixelAttribs */ -- 2.30.2