It's not a question we can answer with certainty ...
But there are hints in Ollivenders sayings. In the last book when Harry asks Ollivenders about wands :
"Much also depends upon the wand itself. In general, however, where a wand has been won, its allegiance will change."
There was silence in the room, except for the distant rushing of the sea.
“You talk about wands like they’ve got feelings,” said Harry, “like they can think for themselves.”
“The wand chooses the wizard,” said Ollivander.
Harry Potter and the Deathly Hollows - Chapter 24 - The Wandmaker
First I'll look at the affirmation that Ollivenders makes that the wand chooses the wizard, he already said that in the first book when Harry bought his wand.
This is emphasized by his speaking of a wand's allegiance so a wand can indeed choose to change its owner.
But the way a wand chooses its new owner isn't as clear, he says that much depends on the wand itself.
That's the end of facts written in the books and the beginning of guesses.
A bit further Ollivenders speak his mind more precisely on the Elder Wand :
"Whether it needs to pass by murder, I do not know."
Harry Potter and the Deathly Hollows - Chapter 24 - The Wandmaker
The fact that Ollivenders can't say if this particular wand needs you to kill its former owner make me think that the wand can change very easily its owner.
My guess is that the wand doesn't only choose its owner but it can also think of itself. This wand that has killed so many men over the past must be angry for power and therefore it must change its owner as soon as it finds someone that can defeat him, even if its former owner has been defeated with another wand.
My final point is that most wands wouldn't have changed from Draco to Harry under these circumstances but this one did because it's special.
Edit :
A little quote from J.K. Rowling on the Elder Wand that confirms partly my guess :
"The Elder Wand knows no loyalty except to strength. So it's completely unsentimental. It will only go where the power is. So if you win, then you've won the wand."
PotterCast Interviews J.K. Rowling, part two.