One way to do this is to laicize the widowed priest so that his subsequent marriage will be that of a layman (and hence not an instance of clerical marriage) and then allow to apply for re-ordination.