I didn't see that. I left after the last question was answered and the debate was over.
First of all even though the McCains are from Mississippi and even though the great-grandfather was a slave-owning planter: nevertheless, a politician with national ambitions, even from Mississippi, wouldn't dare to refuse a black man's handshake on national TV and I don't think McCain would. No matter WHAT he thinks of blacks in private, and I'm pretty sure he hates their guts.
As I tried to follow the sequence of events, McCain reaches round to tap the back of Obama's shoulder, preparatory to a greeting of some kind. Obama turns and extends his hand, but McCain makes two weird left arm and hand movements at that time, the first possibly cueing Cindy to take O's extended hand, and the second during the Cindy-Obama handshake, bringing his open left hand into the same position as Cindy's and Obama's hands, parallel to them but closer to the cameras shooting the scene, almost like three hands are participating in the shake.
It looked to me like possibly McCain wanted Cindy to shake first (ladies first!) intending to shake with Obama immediately after Cindy but then turned to the crowd and forgot all about shaking hands with Obama. A senior moment but not a racist moment, or at most just subconscious racism.