Posting this here since issues/patches seem to be dropped to the
floor.

I've noticed a while ago that the new xlib select devices are queried
poorly when the app becomes idle. I've also noticed just now that when
quering a tablet for values, and there's more then 3 fields queried,
that the input update performance becomes extremely sluggish (as in
pen moving and touching). I propose this patch which solves all of
these issues for me:

Index: pyglet/app/xlib.py
===================================================================
--- pyglet/app/xlib.py  (revision 2449)
+++ pyglet/app/xlib.py  (working copy)
@@ -100,24 +100,8 @@
         self._notification_device.set()

     def step(self, timeout=None):
-        pending_devices = []
-
-        # Check for already pending events
-        for device in self._select_devices:
-            if device.poll():
-                pending_devices.append(device)
-
-        # If nothing was immediately pending, block until there's
activity
-        # on a device.
-        if not pending_devices and (timeout is None or not timeout):
-            iwtd = self._select_devices
-            pending_devices, _, _ = select.select(iwtd, (), (),
timeout)
-
-        if not pending_devices:
-            return False
-
-        # Dispatch activity on matching devices
-        for device in pending_devices:
+        pending, _, _, = select.select(self._select_devices, (), (),
timeout)
+        for device in pending:
             device.select()

--~--~---------~--~----~------------~-------~--~----~
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