Change unit of window