WASHINGTON — A week after mocking his Republican troops over their resistance to an immigration bill, Speaker John A. Boehner returned to Capitol Hill on Tuesday with a different message: Any movement on an overhaul will depend on a new White House attitude toward Republicans in Congress.

But Republicans and Democrats, both publicly and privately, suggested that a narrow window for an immigration bill could open early in the summer — after most of the midterm Republican primaries — if Congress and President Obama build cooperative good will on smaller bills in the coming weeks.

Meeting with House Republicans behind closed doors on Tuesday, Mr. Boehner defended statements he made in his Ohio district last week, when he called members of his conference babies who were whining at the difficulty of moving forward on immigration legislation. The speaker told his members on Tuesday that he was simply kidding around, but he admitted that perhaps he had gone “a little too far.”

“You all know me,” he told reporters after the meeting. “You tease the ones you love.”

But then Mr. Boehner quickly shifted the blame to the president, saying that Mr. Obama had lost the trust of House Republicans through repeated changes to his signature health care law, as well as through his promise to use executive actions to circumvent Congress whenever possible.