[SDL] Re: Active Events on Windows XP
James Turk
james at conceptofzero.net
Sun Oct 20 21:51:01 PDT 2002
After recieving no reply I figure I had better simplify the situation...
Basically if another window gains focus, any application with the code
below will never recieve it's active event. Could someone test this on
another system? Is my event handling completely wrong?
> Hello,
> I have been having issues with SDL Event code using Visual C++.net on
> XP. (SDL-1.2.5a)
>
> I was told on a message board that this code appears as if it should
> work fine, but when the application is minimized without the user
> hitting the - button in the top left corner of the window like if I
> click on the program's entry in the taskbar or another app takes focus
> from it, then it never gets the active message when it is returned
> focus. Is there something I am missing in my event checking code or
> should this concidered a bug?
>
>
> Here is the code in question:
>
> -code-----------------
>
> case SDL_ACTIVEEVENT:
> if(event.active.state == SDL_APPACTIVE ||
> event.active.state == SDL_APPINPUTFOCUS)
> {
> if(event.active.gain == 1)
> {
> Active = true;
> if(UnpauseOnActive)
> UnpauseTimer();
> }
> else
> {
> Active = UnpauseOnActive = false;
> if(!Paused)
> {
> UnpauseOnActive = true;
> PauseTimer();
> }
> else
> UnpauseOnActive = false;
> }
> }
>
> -end code-------------
>
More information about the SDL
mailing list