This is an extract of a commit, minimally edited to ensure it compiles.

Closes #1078.
Related to #197.
This commit is contained in:
Bailey Cosier
2017-09-19 18:27:45 +02:00
committed by Camilla Löwy
parent ac009a5f5c
commit 93e66661d3
9 changed files with 28 additions and 22 deletions
+7 -6
View File
@@ -85,7 +85,7 @@ static int choosePixelFormat(_GLFWwindow* window,
_GLFWfbconfig* u = usableConfigs + usableCount;
PIXELFORMATDESCRIPTOR pfd;
if (window->transparent) {
if (fbconfig->transparent) {
if (!DescribePixelFormat(window->context.wgl.dc,
n,
sizeof(PIXELFORMATDESCRIPTOR),
@@ -168,7 +168,7 @@ static int choosePixelFormat(_GLFWwindow* window,
{
// Get pixel format attributes through legacy PFDs
if (!window->transparent && DescribePixelFormat(window->context.wgl.dc,
if (!fbconfig->transparent && DescribePixelFormat(window->context.wgl.dc,
n,
sizeof(PIXELFORMATDESCRIPTOR),
&pfd))
@@ -217,8 +217,7 @@ static int choosePixelFormat(_GLFWwindow* window,
}
// Reiterate the selection loop without looking for transparency supporting
// formats if no matching pixelformat for a transparent window were found.
if (window->transparent && !usableCount) {
window->transparent = GLFW_FALSE;
if (fbconfig->transparent && !usableCount) {
free(usableConfigs);
_glfwInputError(GLFW_PLATFORM_ERROR,
"WGL: No pixel format found for transparent window. Ignoring transparency.");
@@ -803,10 +802,12 @@ GLFWbool _glfwCreateContextWGL(_GLFWwindow* window,
}
}
if (window->transparent)
if (fbconfig->transparent)
{
if (!setupTransparentWindow(window))
window->transparent = GLFW_FALSE;
_glfwInputErrorWin32(GLFW_PLATFORM_ERROR,
"WGL: Failed to setup window as transparent as requested");
}
window->context.makeCurrent = makeContextCurrentWGL;