Complex sentence: The crown of Hungary was inherited by the Habsburgs, with part of the kingdom preserved from the Ottomans, who were subsequently driven out of Hungary in 1699.
Split into simpler sentences: The crown of Hungary was inherited by the Habsburgs. The Ottomans were subsequently driven out of Hungary in 1699.