[SDL] Frameless/splash window

Samuel Hart criswell at geekcomix.com
Thu Aug 30 12:38:00 PDT 2001


On Thursday 30 August 2001  9:11am, Roger Durañona Vargas wrote:
> How can I make a frameless window (like xmms) or a splash image with SDL?

This was something I needed for TuxReader:
http://www.geekcomix.com/dm/tuxread/

The short answer is yes you can. The long answer is sort of... but the method 
of doing it will probably be changing (since you have to modify the screen 
surface's flags (which are supposed to be read-only).

The way you can do it right now is:

1) Create your screen surface passing SDL_NOFRAME as part of the init flags.

2) Do your splashscreen.

3) Toggle the SDL_NOFRAME flag on your screen surface -For example, if your 
surface is called "screen", you'd have a line like this:
	screen->flags |= ~SDL_NOFRAME;

4) Recreate the surface with another call to SDL_SetVideoMode(...)

However, we're not s'posed to do this. About a week ago, SL said this was a 
bug and that he'd look into it:
http://www.libsdl.org/pipermail/sdl/2001-August/038053.html

I think what is supposed to happen is when you recall SDL_SetVideoMode(..) 
without SDL_NOFRAME, it should switch that flag off if it already on. (Which 
is not what happens now, and why you have to do the kludge listed above ;-)
-- 
Sam "Criswell" Hart <criswell at geekcomix.com> AIM, Yahoo!: <criswell4069>
Homepage: < http://www.geekcomix.com/snh/ >
PGP Info: < http://www.geekcomix.com/snh/contact/ >
Tux4Kids: < http://www.geekcomix.com/tux4kids/ >




More information about the SDL mailing list