WASHINGTON — Sleeves rolled up and tieless, with a candle glowing between them, the two friends slid into a booth next to the kitchen at Liverpool House, a cozy seafood place in a hip Montreal neighborhood. They chatted over oysters, Nova Scotia halibut and a rib steak for two.

That was former President Barack Obama and Prime Minister Justin Trudeau of Canada last Tuesday. Two weeks ago, Mr. Obama and former Prime Minister David Cameron shared a similar scene at a hotel in London. Before that, there were meet-ups with Chancellor Angela Merkel at the Brandenburg Gate in Berlin, and Matteo Renzi, the former prime minister of Italy, in Milan.

One might be forgiven for thinking that Mr. Obama was trolling President Trump.

At a moment when Mr. Trump has left Europeans despairing about the trans-Atlantic relationship, his predecessor is in the middle of a Group of 7 reunion tour. While Mr. Trump lectures his fellow leaders about paying more for NATO or ignores their pleas not to pull out of the Paris climate accord, Mr. Obama appears on panels with allies to discuss issues like food security or how to inspire young people to be more active in their communities.

The meetings beforehand or afterward are private, though they quickly end up on social media, often accompanied by commentary so wistful it makes one imagine the nostalgic G-7 leaders murmuring, “We may not always have Paris, but we’ll always have Barack.”