make window can resize itself when catch SIGWINCH