[Preston] Re: Dialog written with SDL

Ernie Hayes preston at mailman.lug.org.uk
Thu Aug 7 12:25:00 2003


Ernie Hayes wrote:

> Does anyone know how to get a dialog window written with SDL libraries 
> to appear in the center of the screen instead of always appearing in 
> the top left corner?
>
> I know that windows can be centered using X libraries but I don't know 
> if you can use X and SDL libraries together.  


Found a  solution using  "SDL_GetWMInfo(&info)"  to get the window 
manager info and using this you can get the display width and height and 
then you can move the window to the center with "XMoveWindow()".

Thanks
Ernie