I don't know whether I missed something but I can't find a hook like select-window-hook in
stand hooks, and I find some other emacs user has the same issue.
I really want to have a function as select-last-window for emacs, by now, I hack it in a ugly way, and I think select-window-hook can make it better.