aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-31 18:05:34 +0200
committerDavid Robillard <d@drobilla.net>2020-03-31 18:05:34 +0200
commitc4d54bb7b189e18317dc3d59a49603eb56e4908e (patch)
tree251b687feafda26a1274ad83e58a1c81634bdd3a
parentbdb46d4142dc90f224576fb6540eecbd911fb0dd (diff)
X11: Don't wait for timeouts less than a millisecond
-rw-r--r--pugl/detail/x11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c
index 6f85215..3f43a8f 100644
--- a/pugl/detail/x11.c
+++ b/pugl/detail/x11.c
@@ -999,7 +999,7 @@ puglUpdate(PuglWorld* world, double timeout)
if (timeout < 0.0) {
st = puglPollX11Socket(world, timeout);
st = st ? st : puglDispatchX11Events(world);
- } else if (timeout == 0.0) {
+ } else if (timeout <= 0.001) {
st = puglDispatchX11Events(world);
} else {
const double endTime = startTime + timeout - 0.001;