Only alternate title when not focused

Right now when setting an alternating title it'll always alternate, whether you're focused or not. I find this really irritating because I have to unfocus and focus my tab to make it go away. 
This simple fix will only set the alternating title when the window is not focused.