keep the window framebuffer opaque

Both backends asked for an alpha channel (GLFW defaults to 8 alpha
bits, the Wayland EGL config requested 8), so everything the engine
draws with alpha - the UI panels, the water post effect - lowered the
window's own alpha and the compositor blended the desktop through it.
Visible on wine/Proton, where the whole window is composited.

Both now ask for an opaque framebuffer: GLFW_ALPHA_BITS 0, and
EGL_ALPHA_SIZE 0 with a fallback to an alpha config if the driver
provides none. Checked the result through the back buffer attachment:
alpha size is 0 on Wayland and on X11.
This commit is contained in:
alexei-zebra 2026-10-09 16:25:14 +03:00
parent 918051cd5d
commit 4731ac0706
No known key found for this signature in database
GPG key ID: D19D450AC3D9A80E
2 changed files with 5 additions and 2 deletions

View file

@ -603,6 +603,9 @@ std::tuple<
#endif
glfwWindowHint(GLFW_RESIZABLE, GL_TRUE);
glfwWindowHint(GLFW_SAMPLES, settings->samples.get());
// opaque window: the UI is drawn with alpha and would otherwise
// blend with the desktop behind the window
glfwWindowHint(GLFW_ALPHA_BITS, 0);
auto window = glfwCreateWindow(width, height, title.c_str(), nullptr, nullptr);
if (window == nullptr) {