Few visiting dignitaries have captured the imagination of the American public like Chinese leader Deng Xiaoping did on his 1979 tour. The visit marked a turning point in Americans' views of Communist China, and it's a visit that many will have in mind as President Xi Jinping visits Washington this week.

But how exactly did Deng engender such a positive response? Well, many now agree that at least a small part of the thanks has to go one enormous cowboy hat.

The context is vital: Deng's 1979 official visit to the United States came shortly after the two countries normalized relations on Jan. 1. President Jimmy Carter had made the politically risky decision to formally end three decades of diplomatic difficulties almost seven years after President Richard Nixon got the ball rolling with his own trip to China. The move came after the death of Mao Zedong in 1976, and Deng had gradually consolidated enough power to become de facto leader in the country, though Hua Guofeng technically still held the top office.

Aside from his disarming politeness and diminutive stature (he stood less than 5 feet tall), Deng was a smart and driven man -- he was a former military leader who had faced persecution during the Cultural Revolution. He was keen to learn how to modernize China, and so his trip wasn't limited to Washington. Instead, the Chinese leader also visited places such as the headquarters of Coca-Cola in Atlanta and Boeing in Seattle.

It was during a trip to Texas to see the Johnson Space Center that he donned the now iconic hat. Sitting in the audience of a rodeo near Simonton, west of Houston, he was given a 10-gallon hat by a young rider. In his book "Watch Out for the Foreign Guests!: China Encounters the West," Orville Schell, a journalist following Deng at the time, described what happened next.

"The whistling, cheering crowd watches with delight as Deng theatrically dons his new hat. And in one simple gesture, Deng seems to not only end thirty years of acrimony between China and America, but to give his own people permission to join him in imbibing American life and culture."

The photographs of Deng in the cowboy hat appeared in American newspapers, displaying a distinctly human side to a previously mysterious Chinese leader. As Ezra F. Vogel, a biographer of Deng, put it, the "photograph of Deng smiling beneath his ten-gallon hat became the symbol of his visit. It signaled to the U.S. public that he was not only good-humored, but, after all, less like one of 'those Communists' and more like 'us.'" With live broadcasts back to China, these events made news for Deng's home audience, too.

It wasn't all just publicity either -- Deng really did endear himself to Texans. According to the documentary "Mr. Deng Goes to Washington," one of the young riders in the rodeo still remembers that the Chinese leader sent his own doctor to check that she was all right after she was thrown from her horse.

Despite the positive impression made in 1979, Deng's reputation would go on to suffer in subsequent years -- especially after the Tiananmen Square crackdown in 1989 that led to the deaths of hundreds if not thousands of protesters and students. As The Washington Post said when the Chinese leader died in 1997, "Tiananmen Square proved that Deng was more like Mao Zedong than many of Deng's admirers in the West had come to believe." Deng was keen to improve ties with America because he wanted to import Western skills -- he had no desire to import Western democracy.

Should we expect to Xi in the hat? The context has certainly changed. Last year, Orville Schell, now the Arthur Ross director of the Center on U.S.-China Relations at the Asia Society, accompanied former president Carter on a visit to Beijing. Writing in the New York Review of Books, Schell explained how he was shocked at the cold, even humiliating reception that Carter received:

Watching this former US president treated so offhandedly highlighted how the power relationship between the two countries is shifting: it is now not only the West that has wealth. Indeed, China is expected to soon surpass the US in GDP.

More on WorldViews