[Plib-users] Lost and buffered key events
Brought to you by:
sjbaker
From: Joerg H. <jo...@lu...> - 2006-03-01 14:08:36
|
Hi all, I have a problem with plib/pw: it appears that sometimes key events get lost, or are buffered - I guess those issues are related: 1) immediately after starting my plib test program, I press 'up', and after a few seconds (without releasing arrow up) pressing 'left'. Often (though not always) there will be no 'left' event recognised by pw. Once I release the left key, and press it again, everything works fine (just for the record: I don't press more than these two keys, so I don't think that this is related to dead keys when pressing four keys). I printed the events inside pwX11, and: - sometimes no key event at all gets delivered for the first time I press and release 'left' - sometimes I only get a "key release" event, without any previous "key press" event for the 'left' key. 2) I noticed as well that some of my menus are very slow to react. After some searching I again printed the events inside the event loop of pwX11. While my application updates the frames roughly every 0.03 seconds, sometimes events get not delivered at once, but are delayed, and after some time suddenly all events get delivered in the same call to the event handler, e.g. I press and release 'down', 'down', 'up'. I get the event: press 'down' The nothing for 'some time', while I release the key, press 'down' again, release 'down', press 'up'. Then suddenly there are three events reported in the event loop. Now, I was convinced that this was an error in my application, but after some tests I noticed that the original tuxkart sometimes (though not as common as my test program) has the same problem: the kart does not turn left (or right) the first time I press left while accelerating (tuxkart version: 0.40).. My system: centrino laptop (intel, 1.5GHZ)., with Linux suse 10.0, plib-1.8.4-6; Xfree 6.8.2, kernel: 2.6.13-15. I tested the latest plib cvs version as well - same problem. I had the same issues on an Intel 64 bit desktop (with similar suse 10.0 64 bit installation), but on an AMD 64 bit dual core (same suse installation) I don't see this problem. Any ideas what might be responsible for this? And how to avoid it? Any help and hints would be appreciated! Best regards, Joerg -- ---------------------------------------------------------------- Joerg Henrichs Luding Administration e-mail: jo...@lu... URL: http://luding.org |