Lawmakers defied President Donald Trump by excluding many of his demands in an emerging government spending bill. But the measure is not a complete loss for the commander in chief despite the late-game lobbying needed to secure his always tenuous support.

By mid-afternoon Wednesday, as lawmakers were saying final negotiations were underway, Trump’s signature was not yet certain. White House aides had gone silent on the matter, usually a sign the boss is unhappy. But the president signed off on the omnibus spending deal during an afternoon meeting with Speaker Paul D. Ryan, according to a Republican leadership source familiar with the meeting.

“They had a good conversation about the wins delivered for the president, and he is supportive of the bill,” the source said. A senior White House official, when pressed, did not dispute that characterization of Trump’s stance after the Ryan meeting.

Trump had ample reasons to be unhappy. Perhaps that’s why Senate Majority Leader Mitch McConnell stepped out of a meeting to take a call from the president about the spending deal, according to Tennessee GOP Sen. Bob Corker. Ohio Republican Sen. Rob Portman laughed when a reporter informed him Trump needed to be talked into supporting the measure.

From funding for his proposed Southern border wall, to cutting off cash for so-called sanctuary cities, to blocking federal dollars for a massive transit project connecting New Jersey to his native New York City, to new beds for undocumented immigrants, to hiring additional Immigrations and Customs Enforcement agents, Congress did not include many of the presidential asks.