Many of the reactions to situations will be impulsive. We tend to notice the impulsive reactions that are overt and noticeable because they break a rule or code of behavior. However, if you observe the child you will notice a vast array of reactions not all of which are outside accepted behavioral conventions. When an acceptable behavior is presented praise and reward. Having clear behavioral expectations in places the child can see them can help.
Eye contact is a good way of bringing a child back to task.
Seat the unfocused child nearer to your desk and make sure that the child is within your line of sight most of the time. This will help the child stay on task. Don't fall into the trap of getting into discussions where the child is acting as a barrack room lawyer. These are not meaningful to the child and they only serve to wear you out. Make the day's schedule predictable and visible.