Apparently, one of XNextEvent()'s effects is to flush the output buffer. Is there a reason that xcb_wait/poll_for_event() doesn't do the same thing? Looking at the XCB demo code, this would eliminate many boilerplate uses of xcb_flush(). By the way, xcb_wait_for_reply () does flush like this. Ian