Window Focus Handling

I’d like to be able to capture when the window looses focus and stop rendering. This for when the window is minimized or alt-tabed out. Any ideas about how to do this?

That was me-^

Deal!