restore active window on select