sync image after change: XClearWindow(xw->display,xw->window); XSync(xw->display,FALSE); /* act as XFlush and wait for all requests to be received and processed by the X server */ make XSHM stuff thread safe? error handling http://tronche.com/gui/x/xlib/event-handling/protocol-errors/default-handlers.html XVisualInfo http://nobug.ifrance.com/nobug2/article1/babyloon/tut_xwin.htm