On Wed, Sep 22, 2010 at 11:44:46PM +0100, Connor Lane Smith wrote:
> Hey,
> 
> On Wednesday, 22 September 2010, Wolf Tivy <wti...@my.bcit.ca> wrote:
> > I wasn't just being cheap when I left that out. It looks like XPeekEvent
> > blocks, which won't do. I haven't found the (hopefully existent)
> > non-blocking equivalent, so I can't even write that part.
> 
> There are various functions I think you could use. apropos XCheck?

In particular, XCheckIfEvent seems well suited to this situation--feed
in a predicate which specifically finds the repeated KeyPress (matches
time, key, etc.). But this can perform unnecessary computation since it
checks things with higher times as well, of course--I'm still amazed
there is no nonblocking analog to XPeekEvent.

Reply via email to