Merged #472.
Adds feature to pause the slideshow if the window loses focus.