Except that you need to reissue XSetInputFocus each time a window is reexposed after being iconified/minimized.