mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
Added X error reporting to window creation failure.
This commit is contained in:
parent
bc625b21b3
commit
76afd41727
@ -136,6 +136,8 @@ static GLboolean createWindow(_GLFWwindow* window,
|
|||||||
wamask |= CWBackPixel;
|
wamask |= CWBackPixel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_glfwGrabXErrorHandler();
|
||||||
|
|
||||||
window->x11.handle = XCreateWindow(_glfw.x11.display,
|
window->x11.handle = XCreateWindow(_glfw.x11.display,
|
||||||
_glfw.x11.root,
|
_glfw.x11.root,
|
||||||
0, 0,
|
0, 0,
|
||||||
@ -147,12 +149,12 @@ static GLboolean createWindow(_GLFWwindow* window,
|
|||||||
wamask,
|
wamask,
|
||||||
&wa);
|
&wa);
|
||||||
|
|
||||||
|
_glfwReleaseXErrorHandler();
|
||||||
|
|
||||||
if (!window->x11.handle)
|
if (!window->x11.handle)
|
||||||
{
|
{
|
||||||
// TODO: Handle all the various error codes here and translate them
|
_glfwInputXError(GLFW_PLATFORM_ERROR,
|
||||||
// to GLFW errors
|
"X11: Failed to create window");
|
||||||
|
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR, "X11: Failed to create window");
|
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user