Add code to each task to acquire focus