mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-30 05:58:52 -05:00
Moved display closing into _glfwPlatformTerminate.
This commit is contained in:
parent
e5d890a1aa
commit
5d525c4a5f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user