The win_activate function makes the specified window the active window by bringing it into focus and raising it to the top of the display (equivalent to clicking on the window banner). All subsequent input is submitted to this window.
The set_window function directs input to the correct application window. This directs the GUI map to this window.
就我理解
set_window会调整GUI MAP中当前接口
而window_active只是做一个把窗口激活的动作