EVENT GAME FOCUS CHANGED
From ESOUI Wiki
EVENT_GAME_FOCUS_CHANGED (bool hasFocus)
The event fires when the game itself loses or gains focus; that is, when i.e. in windowed mode you click something outside the game window or when you Alt-Tab out of the game. hasFocus is false if you just tabbed out, and true if you just tabbed back in.