In 2012, the last year before the migration crisis began, 140,000 non-Hungarian citizens were living and working in this country of 10 million inhabitants. They came legally, studied at the universities, or found work. You see them all over Budapest: Chinese bars, Turkish restaurants, Syrian cafés, Egyptian doctors, etc. Only about 1,500 asylum seekers entered Hungary in 2013, ten percent of them were granted asylum and stayed. Hungarians did not oppose it, nor did the government. There are also two, small minority communities of Muslims in Hungary, and a lot of Muslim students. Consider this:
"Mostly foreign, religious students who do not know where to practice their religion. They pay pretty heavily, there is a rural university town that practically lives off of students from the Arab world", so the proposal to build a mosque for them should be "formally discussed". Who said that? Viktor Orbán, the allegedly xenophobic prime minister of Hungary. The quote is from May of this year.
So there's always been a legal way to immigrate to Hungary and make it one's home, but this year, as of August, 110,000 asylum seekers have entered the country.