X event loop library