Moved display closing into _glfwPlatformTerminate.

This commit is contained in:
Camilla Berglund 2014-08-21 21:18:02 +02:00
parent e5d890a1aa
commit 5d525c4a5f

View File

@ -605,17 +605,6 @@ static Cursor createNULLCursor(void)
return _glfwCreateCursor(&image, 0, 0);
}
// Terminate X11 display
//
static void terminateDisplay(void)
{
if (_glfw.x11.display)
{
XCloseDisplay(_glfw.x11.display);
_glfw.x11.display = NULL;
}
}
// X error handler
//
static int errorHandler(Display *display, XErrorEvent* event)
@ -734,7 +723,12 @@ void _glfwPlatformTerminate(void)
_glfwTerminateJoysticks();
_glfwTerminateContextAPI();
terminateDisplay();
if (_glfw.x11.display)
{
XCloseDisplay(_glfw.x11.display);
_glfw.x11.display = NULL;
}
}
const char* _glfwPlatformGetVersionString(void)