Thanks for checking on the other platforms -- looks like it must be a
xlib problem.  I was able to fix it for me with a small change in
pyglet/app/xlib.py:

--- a/pyglet/app/xlib.py        Wed Mar 21 12:59:32 2012 +0000
+++ b/pyglet/app/xlib.py        Wed Apr 11 07:44:29 2012 -0700
@@ -110,7 +111,7 @@

         # If nothing was immediately pending, block until there's activity
         # on a device.
-        if not pending_devices and (timeout is None or not timeout):
+        if not pending_devices and (timeout is None or timeout > 0.0):
             iwtd = self._select_devices
             pending_devices, _, _ = select.select(iwtd, (), (), timeout)

I think the second timeout condition is reversed, because the select
should be called when there is a timeout, but NOT called if the
timeout is explicitly zero.  In the original coding, bool(timeout)
returns True when timeout is not zero, so "not timeout" returns True
(and therefore the select clause is executed) iff timeout is zero.  So
the only way the select was called is when timeout == 0, but select
called with a timeout of zero just returns immediately.

Rob

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to