mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
Wayland: Gather framebuffer transparency logic
(cherry picked from commit 7bede13b1d
)
This commit is contained in:
parent
fba79aaaec
commit
ed785a2c79
@ -732,7 +732,8 @@ static GLFWbool createXdgSurface(_GLFWwindow* window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GLFWbool createSurface(_GLFWwindow* window,
|
static GLFWbool createSurface(_GLFWwindow* window,
|
||||||
const _GLFWwndconfig* wndconfig)
|
const _GLFWwndconfig* wndconfig,
|
||||||
|
const _GLFWfbconfig* fbconfig)
|
||||||
{
|
{
|
||||||
window->wl.surface = wl_compositor_create_surface(_glfw.wl.compositor);
|
window->wl.surface = wl_compositor_create_surface(_glfw.wl.compositor);
|
||||||
if (!window->wl.surface)
|
if (!window->wl.surface)
|
||||||
@ -754,6 +755,7 @@ static GLFWbool createSurface(_GLFWwindow* window,
|
|||||||
window->wl.height = wndconfig->height;
|
window->wl.height = wndconfig->height;
|
||||||
window->wl.scale = 1;
|
window->wl.scale = 1;
|
||||||
|
|
||||||
|
window->wl.transparent = fbconfig->transparent;
|
||||||
if (!window->wl.transparent)
|
if (!window->wl.transparent)
|
||||||
setOpaqueRegion(window);
|
setOpaqueRegion(window);
|
||||||
|
|
||||||
@ -919,9 +921,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
|||||||
const _GLFWctxconfig* ctxconfig,
|
const _GLFWctxconfig* ctxconfig,
|
||||||
const _GLFWfbconfig* fbconfig)
|
const _GLFWfbconfig* fbconfig)
|
||||||
{
|
{
|
||||||
window->wl.transparent = fbconfig->transparent;
|
if (!createSurface(window, wndconfig, fbconfig))
|
||||||
|
|
||||||
if (!createSurface(window, wndconfig))
|
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
|
||||||
if (ctxconfig->client != GLFW_NO_API)
|
if (ctxconfig->client != GLFW_NO_API)
|
||||||
|
Loading…
Reference in New Issue
Block a user