• Advertisement
Sign in to follow this  

XLIB non blocking XNextEvent

This topic is 3922 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just started using linux a couple days ago so I'll probably have a lot of questions. As for now I am messing around with XLib and am porting my GUI to it. Since it is a game GUI and some games still need to run while the gui is running, I need an input poller that doesn't block (asynchronous if you will). I googled this a bit, but can't seem to find any help. I'd prefer not to have to fork a child thread for the gui, but if I have to, then I suppose that it is the only option.

Share this post


Link to post
Share on other sites
Advertisement
you can use XPending to check if there are any events pending, and only call XNextEvent if there are.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement