mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 13:46:37 +00:00
wayland: Only set the opaque region if we got a opaque buffer
If the application set the window ALPHA_BITS hint to > 0, we will choose an RGBA buffer instead of an RGBX buffer, meaning it will not be opaque, and if so, lets not lie to the compositor saying it's opaque.
This commit is contained in:
parent
6019072eef
commit
9d3eafa1a2
@ -178,6 +178,12 @@ static const struct wl_surface_listener surfaceListener = {
|
||||
static void setOpaqueRegion(_GLFWwindow* window)
|
||||
{
|
||||
struct wl_region* region;
|
||||
int alphaBits;
|
||||
|
||||
eglGetConfigAttrib(_glfw.egl.display, window->context.egl.config,
|
||||
EGL_ALPHA_SIZE, &alphaBits);
|
||||
if (alphaBits > 0)
|
||||
return;
|
||||
|
||||
region = wl_compositor_create_region(_glfw.wl.compositor);
|
||||
if (!region)
|
||||
|
Loading…
Reference in New Issue
Block a user