I think you’d be better off checking that the window has lost focus, but I’m not seeing anything about this in documentation so I’m not sure what you’re supposed to do with this.