I always use a technique a straight former co-worker used with women. "Hey, do you want to fuck or are you straight?"
Of course, I'm being facetious. I usually smile and say "hello."
As for the straight co-worker, he almost got his head handed to him when used his line on a woman at happy hour. We stopped inviting him with us.