Advertisement

XLIB non blocking XNextEvent

Started by May 31, 2007 01:47 PM
0 comments, last by emptyhead 17 years, 4 months ago
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.
you can use XPending to check if there are any events pending, and only call XNextEvent if there are.
:wq!

This topic is closed to new replies.

Advertisement