SDL_CreateWindowFrom in linux

Hi everyone, I tried SDL_CreateWindowFrom (Window type is XID) in ubuntu linux, and use SDL_WaitEvent to get event. There is nothing SDL_Event return, PumpEvent always get a GenericEvent and may be discard it. How do I use SDL_WaitEvent and pump SDL events?
best regards!