[SDL] SDL 1.3 checking if a window is shown or not

Sam Lantinga slouken at libsdl.org
Wed Jul 21 18:40:32 PDT 2010


Yes, that's the proper way to do it, and yes the flags are kept in
sync with the state of the window.

On Tue, Jul 20, 2010 at 10:59 AM, Alex Barry <alex.barry at gmail.com> wrote:
> Is this the proper way to do it:
>
> int window_visible = (SDL_GetWindowFlags( context->window ) &
> SDL_WINDOW_SHOWN);
>
> Or does SDL_GetWindowFlags() only look at the initialization flags?  If
> that's the case, I can manually keep track of it, but I was just wondering
> out of convenience.
>
> Also as an tangent of the question, do SDL_ShowWindow() and SDL_HideWindow()
> change the flags?
>
> Thanks,
> -Alex
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>



-- 
    -Sam Lantinga, Founder and President, Galaxy Gameworks LLC



More information about the SDL mailing list