[SDL] Re: Window resizing

Randi J. Relander relander at geocities.com
Fri Apr 28 08:53:40 PDT 2000

"Francis Irving" wrote
> It seems then that there are two sorts of resizing
> 1. One that keeps the underlying SDLSurface the same
> size, and blits it in a scaled way.
> 2. One that resizes the underlying SDLSurface.
> To do number 2, it would presumably need some kind
> of callback so the application can build the contents of
> the larger surface.

I am definitely in favor of resizing the underlying surface versus
stretching it. We would need an "SDL_SizeEvent" since a callback would have
the same multi-thread issues an event filter. We would also need an
"SDL_RESIZEABLE" flag to pass when setting the video mode so that the window
manager will allow the window to be resized.

Without a callback there are synchronization issues between the window
manager and the SDL internal event queue. Maybe SDL should just use the
original shadow surface until the application receives the "SDL_SizeEvent".
You would end up with an unpainted border on the bottom and right-hand sides
(assuming you are making the window bigger) until the event made it through
the internal event queue but at least things wouldn't change while the
application wasn't looking.

- Randi

Regimental Command
Generic Armored Combat System

More information about the SDL mailing list