XEventNext blocking

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… :stuck_out_tongue:

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

Thqnks you !

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

Thanks, I will try that :slight_smile:

while(XPending(p_Display)){
XNextEvent(p_Display, &event);

}
is most probably what you are after.

Concur with the above solutions, however be aware you still get soft realtime. hard realtime and unix, specifically X are mutually exclusive.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.