From 9f5a4832561b609fcf852948b6187be84a546c83 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Fri, 14 Aug 2015 13:52:02 +0200 Subject: [PATCH] Fix glfwWaitEvents returning prematurely on X11 --- README.md | 1 + src/x11_window.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5653bb82..3595eadc 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ GLFW bundles a number of dependencies in the `deps/` directory. - [X11] Bugfix: `GLFW_ARROW_CURSOR` selected the wrong cursor image - [X11] Bugfix: The `GLFW_DECORATED` hint was not ignored for full screen - [X11] Bugfix: `glfwWaitEvents` did not handle `EINTR` for `select` + - [X11] Bugfix: `glfwWaitEvents` could return when no events were available - [WGL] Made all WGL functions dynamically loaded - [WGL] Removed `GLFW_USE_DWM_SWAP_INTERVAL` compile-time option - [WGL] Bugfix: Swap interval was ignored when DWM was enabled diff --git a/src/x11_window.c b/src/x11_window.c index eabe2066..bf281dd1 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -1758,7 +1758,7 @@ void _glfwPlatformPollEvents(void) void _glfwPlatformWaitEvents(void) { - if (!XPending(_glfw.x11.display)) + while (!XPending(_glfw.x11.display)) selectDisplayConnection(NULL); _glfwPlatformPollEvents();