Function: handle-select-window
Handle select-window events.