PDA

View Full Version : XEventNext blocking ...



Groovounet
09-28-2005, 03:15 AM
According my code and the fellowing link
http://tronche.com/gui/x/xlib/event-handling/manipulating-event-queue/XNextEvent.html

XEventNext is a blocking function and this is bad for a real time programme... :p

My question is : How to get event without blocking the rendering loop under X Window with OpenGL ?

Thqnks you !

ZbuffeR
09-28-2005, 03:22 AM
Use one of the XCheck*Event, those are non-blocking.
http://tronche.com/gui/x/xlib/event-handling/manipulating-event-queue/XCheckWindowEvent.html

Groovounet
09-28-2005, 03:35 AM
Thanks, I will try that :)

Plüss Roland
10-11-2005, 11:46 AM
while(XPending(p_Display)){
XNextEvent(p_Display, &event);
...
}is most probably what you are after.

10-14-2005, 12:56 PM
Concur with the above solutions, however be aware you still get _soft_ realtime. _hard_ realtime and unix, specifically X are mutually exclusive.