It must be very frustrating for President Trump to think he has power in his grasp, only to see constitutional levers pulled to snatch it away. No politician has been more frustrated by such a situation since, oh, November, when Hillary Clinton won the popular vote but her opponent earned more votes in the electoral college. But those are the rules.

On Wednesday morning, the 2016 victor took to Twitter to rail against a California district judge’s decision to temporarily block the administration’s proposal to withhold funding from “sanctuary cities” — jurisdictions that offer limited protection to undocumented immigrants with the aim of encouraging their participation in things such as police investigations.

Let us set aside for a moment the fact that the judge in San Francisco was not actually a member of the Court of Appeals for the 9th Circuit. Let us also set aside that this wasn’t really a case of “judge shopping,” where litigants seek to file a suit in a friendly jurisdiction. Both San Francisco and Santa Clara County are sanctuary areas, part of a group of jurisdictions specifically targeted by the Justice Department on this issue last week. That they filed suit is hardly surprising.

So let’s instead focus on a little quirk of the decision that sets it apart as a constitutional check from what happened to Clinton. In the case of both the sanctuary cities decision and that second case mentioned, Trump’s it’s-not-a-ban travel ban, popular national opinion seems to lie with how the judges ruled.

Fox News Channel asked about both subjects in March. On the subject of funding for sanctuary cities, the poll was explicit, framing the idea in a very Trump-friendly way: “Some so-called ‘sanctuary’ cities refuse to assist federal authorities detain and deport illegal immigrants. Do you favor or oppose penalizing those cities by taking away their federal funding?” Nonetheless, more than half of respondents — including a plurality of independents and a majority of Democrats — opposed the move.

The question about the revised travel ban had similar results. Bear in mind, this was a question about the second ban, the one the Trump administration crafted with the specific (although unsuccessful) aim of avoiding the legal opposition that foundered the first version. Here, too, a majority — including a majority of independents — held an opinion contrary to the president’s.

It’s fair to note that polling on the immigration ban was, for some time, rather mixed, depending in part on how the ban was described in the poll.

Let’s instead pose a more direct question. In the most recent Washington Post-ABC News poll, we asked respondents how they felt about the court decision itself, and whether they were sympathetic to the repeated administration insistence that these decisions were an unwarranted rejection of Trump’s legal authority. A majority — nearly 6 in 10 — said the courts were acting fairly within the scope of their constitutionally defined check on the executive branch.

Although the partisan splits in each of these questions was obvious, we’ll note something here: More than a third of Republicans agree that the court’s decision on the travel ban was a fair exercise of its power.

That remains the central irony to Trump’s objections to the court standing in his way. A president who holds his office thanks to the rules of the Constitution finds those same rules annoying when they keep him from doing what he wants. No group is more appreciative of that, the polling above suggests, than the people most annoyed by the rules a few months ago: Clinton voters.