Changed logic for transitions to prevent transform-jump when dettaching from window