[X11] Flush XSendEvent on exit