stop some periodic polling when out of focus

fixes #328