From b4509e341a67bce53a6c56d257fb27147314e0c6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 1 Dec 2017 10:13:32 +0530 Subject: [PATCH] Update glfw --- glfw/glfw3.h | 11 +++++------ glfw/x11_init.c | 7 +++---- glfw/x11_monitor.c | 3 +-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/glfw/glfw3.h b/glfw/glfw3.h index 041d63521..23973ad3f 100644 --- a/glfw/glfw3.h +++ b/glfw/glfw3.h @@ -5001,12 +5001,11 @@ GLFWAPI void glfwSwapBuffers(GLFWwindow* window); * is sometimes called _vertical synchronization_, _vertical retrace * synchronization_ or just _vsync_. * - * Contexts that support either of the `WGL_EXT_swap_control_tear` and - * `GLX_EXT_swap_control_tear` extensions also accept negative swap intervals, - * which allow the driver to swap even if a frame arrives a little bit late. - * You can check for the presence of these extensions using @ref - * glfwExtensionSupported. For more information about swap tearing, see the - * extension specifications. + * A context that supports either of the `WGL_EXT_swap_control_tear` and + * `GLX_EXT_swap_control_tear` extensions also accepts _negative_ swap + * intervals, which allows the driver to swap immediately even if a frame + * arrives a little bit late. You can check for these extensions with @ref + * glfwExtensionSupported. * * A context must be current on the calling thread. Calling this function * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error. diff --git a/glfw/x11_init.c b/glfw/x11_init.c index 4c863c38c..6786231c8 100644 --- a/glfw/x11_init.c +++ b/glfw/x11_init.c @@ -994,8 +994,6 @@ void _glfwPlatformTerminate(void) _glfw.x11.im = NULL; } - _glfwTerminateEGL(); - if (_glfw.x11.display) { XCloseDisplay(_glfw.x11.display); @@ -1026,8 +1024,9 @@ void _glfwPlatformTerminate(void) _glfw.x11.xinerama.handle = NULL; } - // NOTE: This needs to be done after XCloseDisplay, as libGL registers - // cleanup callbacks that get called by it + // NOTE: These need to be unloaded after XCloseDisplay, as they register + // cleanup callbacks that get called by that function + _glfwTerminateEGL(); _glfwTerminateGLX(); #if defined(__linux__) diff --git a/glfw/x11_monitor.c b/glfw/x11_monitor.c index d68c58886..d9144bb48 100644 --- a/glfw/x11_monitor.c +++ b/glfw/x11_monitor.c @@ -203,8 +203,7 @@ void _glfwPollMonitorsX11(void) free(disconnected); } - - if (!_glfw.monitorCount) + else { const int widthMM = DisplayWidthMM(_glfw.x11.display, _glfw.x11.screen); const int heightMM = DisplayHeightMM(_glfw.x11.display, _glfw.x11.screen);