Yes, from WW1 to WW2 the city of Lwow was Polish territory, that is, for only 20 years. Prior to this Lwow was called Lemberg and belonged to the Austro-Hungarian Empire ruled by the Habsburg monarchy.
At that time, Stalin took from Poland, for example, Lviv and the eastern territories and gave it Wrocław and the lands in the west (former Germany), although in my opinion Poland should have received both, because it is probably the only country in Europe that didn`t collaborate with Hitler.