Properly rotating window around its center.