SDL 1.3 checking if a window is shown or not

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

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

Perfect, thanks Sam.On Wed, Jul 21, 2010 at 9:40 PM, Sam Lantinga wrote:

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> 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


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

You’re welcome! :)On Wed, Jul 21, 2010 at 6:51 PM, Alex Barry <alex.barry at gmail.com> wrote:

Perfect, thanks Sam.

On Wed, Jul 21, 2010 at 9:40 PM, Sam Lantinga <@slouken> wrote:

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


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


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