[SDL] Window/surface dimensions mismatch problem

Daniel Phillips phillips at arcor.de
Sun Jan 12 18:57:01 PST 2003


I have SDL+OpenGL window resizing working fine, except for one problem.  The 
short decription is: SDL always wants SDL apps to specify their initial 
window size, and to somehow know what that size should be.  As far as I can 
see, SDL does not provide a means for an SDL app to create its initial window 
at a size requested by a Window manager.

Now for the long version:  Sometimes a window manager has its own ideas about 
what size a window should be.  Actually, this is nice for users, as they 
generally do not like it when an application window re-appears in a different 
place than they last placed it, or at a different size than they last set it 
to.  In KDE, the ability to teach this behaviour to applications that don't 
understand such niceties is provided through the "store settings" option in 
the window menu.  When this option is set, instead of creating the 
application's window at the size specified by the application, KDE's window 
manager creates the window at a size and location it stored previously.

An SDL app with a resizable window doesn't play nicely with this KDE feature, 
in that it will go ahead and create the surface at the size it thinks is 
right.  This may not be the size of the window that the window manager 
actually created, which results in a nasty mismatch that doesn't go away 
until a window resize event is received, probably generated by an irritated 

What to do about this?  I don't know, this seems a little messy, and I'm not 
prepared to make a concrete suggestion or offer a patch at this point.  Have 
I missed something obvious?



More information about the SDL mailing list