SDL_APPMOUSEFOCUS not set on app start?

This appears to be a bug in SDL 1.2.12 that I’m running into. When my
application starts, and it’s window opens beneath the mouse cursor (windowed
mode), I find SDL_GetAppState() returns SDL_APPINPUTFOCUS|SDL_APPACTIVE. The
SDL_APPMOUSEFOCUS flag is not set. If I move the mouse off the window, no
SDL_ACTIVEEVENT is generated.

Once I move the mouse back onto the window, SDL_ACTIVEEVENT events and the
SDL_APPMOUSEFOCUS flag work as expected.

Anybody have a bugfix or workaround for this? Thanks!

SDL 1.2.12
mingw (gcc 3.4.2)
Windows XP Pro

Alexis Janson