[SDL] Catching Iconify/Deiconify messages from WM

Laurent Carlier lordheavy at infonie.fr
Wed Aug 9 04:26:27 PDT 2006


Le mardi 8 août 2006 23:32, George a écrit :
> How to catch when window manger iconify my SDL window and restore it from
> iconified state?
>
>

You can use the SDL_ACTIVEEVENT event :

"When the mouse leaves or enters the window area a SDL_APPMOUSEFOCUS type 
activation event occurs, if the mouse entered the window then gain will be 1, 
otherwise gain will be 0. A SDL_APPINPUTFOCUS type activation event occurs 
when the application loses or gains keyboard focus. This usually occurs when 
another application is made active. Finally, a SDL_APPACTIVE type event 
occurs when the application is either minimised/iconified (gain=0) or 
restored."






More information about the SDL mailing list