it had also been the time when cesare had set out to subjugate the city-states of the romagna , and when the king of france had taken milan , justifying his action as being the rightful heir-the great-grandson of gian galeazzo visconti .