fully handle XIM_CONNECT