President Trump assured Senator Joe Manchin III, Democrat of West Virginia, on Thursday that he was still considering legislation that could include background checks for gun buyers. But White House aides said they had polling data showing that gun control was politically problematic for the president, according to two people briefed on the meeting.

Inside the White House, the issue of new gun control measures has largely been theoretical. Senator Mitch McConnell, Republican of Kentucky and the majority leader, has cautioned that it will be the president who will have to press his party to act. To help guide Mr. Trump’s decision-making, White House aides commissioned a poll to determine where his supporters stood on different measures.

For his part, the president has sent conflicting signals about his plans, depending on with whom he is speaking, and the issue has taken on a new urgency after a shooting spree in West Texas over the weekend.

Days after consecutive shootings in El Paso and Dayton, Ohio, in early August, Mr. Trump said that he wanted to pursue what he described as “very meaningful background checks.” But that resolve appeared to soften amid concerns from the National Rifle Association and some of his closest advisers and family members, including his eldest son, Donald Trump Jr. The president, reverting to a stance he has taken since the 2016 campaign, has subsequently focused more on mental health issues and the deficiencies in treating them.