U.S. President Barack Obama fist bumps the cashier after paying for his order at Franklin Barbecue in Austin, Texas July 10, 2014.

Daniel Rugg Webb, a 32-year-old cashier at Franklin Barbecue in Austin, Texas, had been hearing the rumor all day on Thursday: President Obama was stopping by. He and his co-workers didn't give much credence to the idea—that is, until eight secret service agents, and then some, walked into the restaurant in the afternoon.

"[They] frisked everybody, which was kind of my favorite part," Webb recalled in an interview with BuzzFeed Saturday night. "Then he just showed up."

Webb, who is also a comedian and retired musician, wasn't about to miss his opportunity to say whatever he wanted to a sitting president. So, after he had introduced himself and the president was signing a reportedly $300 bill, he slammed his hand on the counter.

"Equal rights for gay people!" he exclaimed.

Obama reacted without missing a beat. "Are you gay?"

Taken aback by the directness of the question, he said, Webb responded, "Only when I'm having sex!"

The president laughed, then, realizing there was a group of children near the two, said, "Not in front of the kids!"

The two men bumped fists and that was that.

The exchange was first reported by the Austin Chronicle.

"As a comedian, it was cool to have a moment where I was making a sitting president laugh — over something that might be considered inappropriate is a bonus," Webb said of the experience.

He said he had been hoping to get in a joke about Texas Governor Rick Perry, who he described as "famously anti-gay."

While Webb said he appreciates Obama's social progressiveness, he expressed hope that the president will close the gap between his own relative forward-thinking on gay rights, and his general quietness on the anti-gay views of many state leaders before he leaves office.

"It would be interesting if he could call some people out for it. People can use a lot of things—religion, freedom of speech—to be anti-gay, but I need people to understand you can call people out for civil rights things," Webb said.

"We are an anti-gay state. We are a state with a whole bunch of hungry children and sick old people, and [Rick Perry is] grandstanding on things that will get him a better election," Webb said. "And it's glaringly obvious. He's kind of primitive in his social beliefs. I would like to see Rick Perry negatively influenced by any kind of attention. Even Obama laughing at something as, hopefully, acceptable as sexuality can show the difference."