Is there a way for me to catch that my application is no longer the active application?