Not much else needed to describe my question.
I managed to do this with some JS code.
dropbox.com/s/kbxitrfg4h1xxoc/WindowFocus.capx
Not sure if it will work on all platforms. You can try different event handlers instead of "onblur".
Develop games in your browser. Powerful, performant & highly capable.
Hey, thanks a bunch! This will do nicely.