I use select() and XConnectionNumber to process XEvent and custom
event in my main loop.
The file descriptor returned by XConnectionNumber just works for me.(I
process the StructureNotify and KeyPress event only)

But I want to know more about XAddConnectionWatch. What can I get from
it more?
I knew it has something to do with the concept Internal
Connection,Could you give me some example about Internal Connection
besides the input method of asian language?