[SDL] The "proper" way to detect an app context switch

Sam Lantinga slouken at devolution.com
Tue Sep 10 21:40:01 PDT 2002

> > Use SDL_ACTIVEEVENT, you are guaranteed to get it when your application loses
> > focus (and if you don't, it's a bug) :)

> On X11, this gets triggered when your mouse leaves the window, even if you
> Window Manager doesn't switch the keyboard focus away. Is this a bug?

There are three different flags that can be associated with this:
application focus, mouse focus, and keyboard focus.  You can gain
or lose any of the above to get an SDL_ACTIVEEVENT.

See ya,
	-Sam Lantinga, Software Engineer, Blizzard Entertainment

More information about the SDL mailing list