Analogy isn't valid.
Depends why the student isn't listening that matters in your analogy, as to what course of action should be taken. If it's because he wants attention, then yes - ignoring him
is the best option because you don't want to positively reinforce his bad behavior, and want him to seek out his attention through other means (By participating in class non-disruptively).
The point of school is
supposed to be to prepare students for life outside of school. If a student needs constant supervision to behave, he will not be able to maintain a job because that environment doesn't exist in the real world, because you can always get a new employee instead of taking one that needs constant supervision.
By giving too much attention to students, or by babying them (Banning social networks "for their own good") they won't learn or be able to handle themselves (as well) when the environment isn't in place (Environment where they're babied).
Unless you're trying to create an environment where students are merely drones and good for corporate and factory work and not independent thought, choices and freedom that is.