Moved viewport reshaping logic to a Window Notifiee.