Issue 437 in pyglet: evdev processing of events

14 views
Skip to first unread message

codesite...@google.com

unread,
Aug 15, 2009, 11:37:00 PM8/15/09
to pyglet...@googlegroups.com

Comment #2 on issue 437 by m.e.w.oleary: evdev processing of events
http://code.google.com/p/pyglet/issues/detail?id=437

Has this patch been tested? The following line doesn't make any sense to me:

if len(self.seen) == self.controls:

As best I can tell, self.controls should be a tuple, so this condition will
never be true, and the ControlGroup will
never trigger.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
Aug 16, 2009, 12:00:30 PM8/16/09
to pyglet...@googlegroups.com
Updates:
Labels: OpSys-Linux

Comment #3 on issue 437 by m.e.w.oleary: evdev processing of events
http://code.google.com/p/pyglet/issues/detail?id=437

(No comment was entered for this change.)

codesite...@google.com

unread,
Aug 16, 2009, 2:05:35 PM8/16/09
to pyglet...@googlegroups.com

Comment #4 on issue 437 by pyalot: evdev processing of events
http://code.google.com/p/pyglet/issues/detail?id=437

You're ignoring that EventGroups also get triggered at the end of the
select, which
is what is working for me. You can patch it with:

--- a/pyglet/input/base.py Sun Aug 16 14:13:10 2009 +0200
+++ b/pyglet/input/base.py Sun Aug 16 20:03:25 2009 +0200
@@ -130,7 +130,7 @@ class ControlGroup(EventDispatcher):

def event_for(self, control):
self.seen.add(control)
- if len(self.seen) == self.controls:
+ if len(self.seen) == len(self.controls):
self.trigger()

def trigger(self):

On any account, you do *need* to group events sometimes (for instance for a
tablet).

codesite...@google.com

unread,
Aug 16, 2009, 5:48:04 PM8/16/09
to pyglet...@googlegroups.com

Comment #5 on issue 437 by m.e.w.oleary: evdev processing of events
http://code.google.com/p/pyglet/issues/detail?id=437

I'm not disputing the need for this patch. It seems like it fills a very
real need. I was just asking, given that I
don't have a Linux box to test on, whether it actually worked. The fact
that it contained code that was obviously
never executed felt slightly odd to me.

codesite...@google.com

unread,
Aug 17, 2009, 2:08:58 AM8/17/09
to pyglet...@googlegroups.com

Comment #6 on issue 437 by pyalot: evdev processing of events
http://code.google.com/p/pyglet/issues/detail?id=437

If you've got a better idea how to correlate events over time be my guest.

Reply all
Reply to author
Forward
0 new messages