R: [SDL] SDL_APPACTIVE & WIN2k

Giovanni Bajo bagio at prograph.it
Tue Jan 30 02:12:19 PST 2001


>From the spy log, I can see these messages:

WM_NCACTIVATE
WM_ACTIVATE fActive:WA_ACTIVE fMinimized:true hwndPrevious:(null)
WM_NCPAINT hrgn:1
WM_WINDOWPOSCHANGED
WM_MOVE xPos:33536 yPos:33536 (?)
WM_SIZE fwSizeType:SIZE_MINIMIZED nWidth:0 nHeight:0


I'd suggest to ignore the WM_ACTIVATE message since it does not seem to do
what you need. You should check for WM_ACTIVATEAPP and WM_SIZE.
Basically:

case WM_ACTIVATEAPP:
  if (wParam)
      appActive = true;
  else
      appActive = false;

case WM_SIZE:
  if (wParam == SIZE_MAXHIDE || wParam == SIZE_MINIMIZED)
      appActive = false;
  else
      appActive = true;

Hope this helps.

---
Giovanni Bajo
Lead Programmer

Protonic Interactive
www.protonic.net

- Black holes are generated when God divides by zero -


> -----Messaggio originale-----
> Da: owner-sdl at lokigames.com [mailto:owner-sdl at lokigames.com]Per conto di
> Sam Lantinga
> Inviato: martedì 30 gennaio 2001 7.19
> A: sdl at lokigames.com
> Oggetto: Re: [SDL] SDL_APPACTIVE & WIN2k
>
>
> > Hello!
>
> > This is my first mail to the list, so first of all:
> > thanks to Sam for writing SDL (and to all the helpers).
>
> > My questions is...
> > When I'm querying SDL_GetAppState() for SDL_APPACTIVE state
> (under Win 2k),
> > I get false when I minimized the window by the minimization button,
> > but I get true when I minimized it by clicking on the app button in the
> > task bar (or whatever you call the thing with "start" on the left).
> > Am I missing something or is SDL (1.1.7) missing something?
>
> SDL is missing something.
> Can you debug the windows messages that are sent when the app button is
> clicked on the task bar, so we can see what SDL should be reacting to?
>
> Thanks!
> 	-Sam Lantinga, Lead Programmer, Loki Entertainment Software
>





More information about the SDL mailing list