sentences:  In 1683 Polish King John III Sobieski stopped in the city before the Battle of Vienna.In the 17th and 18th century, the city's economy switched from trading and brewing beer to clothmaking, which collapsed after the 18th-century Silesian Wars.During the mid 18th century Silesian Wars, Gleiwitz was taken from the Habsburg Monarchy by the Kingdom of Prussia along with the majority of Silesia.