WHEN Deng Xiaoping donned a cowboy hat at a rodeo during his first trip to America soon after the two countries re-established diplomatic ties in 1979, his striking gesture symbolised the end of a decades-long freeze. The Chinese were not only opening up their markets, but also their minds. Deng’s hosts dared to hope that engagement with China would help to mould it in America’s image. Xi Jinping, China’s president, will make his own attempt at retail politics when he visits the United States from September 22nd. But he will do little to win over Americans—now far less optimistic about changing China, and increasingly wary of its growing strength. The question is whether Mr Xi cares what America thinks.

This is an important moment for one of the world’s most vital relationships. Trust is fading on both sides. Mr Xi has shown signs of impatience with Deng’s policy of keeping a low profile in foreign affairs, which the late leader poetically described as taoguang yanghui, or “hiding brightness, nourishing obscurity”. Since he took over in 2012, Mr Xi has been flexing muscle in the seas of the western Pacific, avoiding direct confrontation with America and its allies but testing their resolve (new satellite images released by an American think-tank on September 15th appeared to show that China was building a third airstrip in disputed waters of the South China Sea, despite calls by America and others to desist). America has responded to such moves by beefing up its alliances. It too wants to avoid a conflict, but countries in the region fret about possible accidents that could trigger one.

This will not be the first extended meeting between Mr Xi and Barack Obama, the American president. But it will be Mr Xi’s first trip to the White House since he took office; there he will enjoy the formal pomp of a state visit, complete with 21-gun salute and brass fanfare. The two sides will have much to chew over at their meetings and a black-tie state dinner at the White House: the alleged hacking of 22m American government employees’ personal records by Chinese cyber-spies in April; accusations that China is manipulating its currency to make exports cheaper; as well as China’s island-building in the South China Sea. Mr Xi’s suppression of civil society and tightening of controls on the internet will be on the agenda too, though the Americans do not want to let disputes over such issues aggravate other disagreements.

Not all is acrimony. In recent months there have been notable areas of accord. In November the two countries reached an agreement on carbon emissions, which they hope will encourage progress at UN climate talks in Paris later this year. China helped broker a nuclear deal with Iran in April. It is moving closer to America’s stance on North Korea. There is even speculation that the two countries may announce an eye-catching deal (on what is unclear) during Mr Xi’s trip. But it would have to be a big one to improve the mood.

It does not help that both countries are preoccupied with politics at home. Mr Xi is waging the most sustained and far-reaching campaign against corruption that China has seen in decades. This is partly aimed at boosting the Communist Party’s image, and partly at intimidating anyone who might think of challenging him. He has his eye on leadership changes in 2017. Five of the seven most powerful leaders are due to retire then; he wants trusted supporters to replace them. Displaying backbone in dealing with foreigners is never a bad tactic in Chinese politics.

Similarly in America, the approach of next year’s presidential elections is giving rise to more China-bashing than usual. Donald Trump, fighting for the Republican nomination, has accused China of “raping” America and trying to “suck the blood” out of it. Mr Trump and others view China’s devaluation of the yuan in August as the first shot in a global currency war—an attempt to boost exports and “steal” American jobs.

Such sentiment helps explain why Mr Xi’s first stop will be in Seattle, to meet tech executives. Business was once a bridge between the two countries. Now it too is part of a tangled geopolitical rivalry. America accuses China of abetting cybercrime and stealing intellectual property. Just before the visit, American officials mulled slapping sanctions on Chinese companies suspected of pinching American secrets. Mr Xi’s meetings in Seattle appear aimed at showing that China, far from harming American business, is still a boon to it. He also wants to make a point to Mr Obama: American companies, for all their concern about Chinese cybertheft, are still hungry for access to China’s huge market. But the allure of China’s economy is fading. When Mr Xi last visited America in 2013, for an informal “no neckties” summit with Mr Obama at a Californian ranch, China’s growth was already slowing. Now worries are mounting in America that China could suffer a “hard landing”, brought on by piles of debt. The Chinese government’s image among American business leaders, as well as at home, has been tarnished by its botched attempt in August to prop up the country’s stockmarket. Details released on September 13th of plans for reforming state enterprises may have been intended to show that Mr Xi is still a reformer at heart. But they were hardly inspiring (see page 64). Mr Xi may hope that nationalist displays will help to boost his popularity among middle-class Chinese as the economy enters a rough patch. A military parade through Beijing on September 3rd, involving 12,000 goose-stepping troops and ballistic missiles—some of them recently developed in order to keep American power at bay—was one such. Its stated purpose was to commemorate the defeat of Japan in the second world war, but it was also clearly intended to reinforce Mr Xi’s prestige. It was the first such review since he became China’s leader, and the first marking victory over Japan; America and most of its allies pointedly stayed away. Chinese leaders’ pride in shows of pomp extends to American soil. Mr Xi’s predecessors viewed their receptions at the White House as a badge of honour—symbolic, as they saw it, of America’s acceptance of China as a global power. So Mr Xi will at least try to appear civil during his trip. In recent weeks state media have toned down their anti-American rhetoric, referring to relations with the United States as “a little awkward” and even describing American reservations about China’s rise as “understandable”.