mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
X11: Make event polling more robust
This makes X11 event polling less likely to block if the application uses the display via native access. Fixes #1225.
This commit is contained in:
parent
15d89bdff6
commit
8d1a64c831
@ -2672,8 +2672,9 @@ void _glfwPlatformPollEvents(void)
|
||||
#if defined(__linux__)
|
||||
_glfwDetectJoystickConnectionLinux();
|
||||
#endif
|
||||
int count = XPending(_glfw.x11.display);
|
||||
while (count--)
|
||||
XPending(_glfw.x11.display);
|
||||
|
||||
while (XQLength(_glfw.x11.display))
|
||||
{
|
||||
XEvent event;
|
||||
XNextEvent(_glfw.x11.display, &event);
|
||||
|
Loading…
Reference in New Issue
Block a user