fixing a bug where transitions would mess up if user left window focus and returned. Now pauses all transitions when window is unfocused.