[SDL] Re: sdl windows position on screen

Ricardo Cruz rpmcruz at clix.pt
Wed Nov 9 03:38:51 PST 2005


Hi there,

 This is not really related with this specific problem, but just a couple of 
questions that have jumped my mind before:

* If you use X11 library functions do you need to append a -lXlib yourself or 
the -lSDL is enough?

* Is there any environment define to know if this is a Unix system we are 
compiling in... I generally end up using "#ifndef WIN32".

Cheers,
 Ricardo

Em Terça 08 Novembro 2005 20:24, o Bill May escreveu:
> florence blabla wrote:
> > when i open an sdl windows , windowed mode , it
> > appears
> > at randon place on the screen...
> >
> > is it possible to place window sdl at x , y
> > coordinates
> >
> > (sorry for my english ) , under sdl or by another way.
> >
> > under X11 and linux , programming in freepascal...
> >
> > thanks ....
>
> Do this after SDL_SetVideoMode:
>
>      SDL_SysWMinfo info;
>      SDL_VERSION(&info.version);
>      int ret;
>      ret = SDL_GetWMInfo(&info);
>      if (ret > 0) {
> #ifdef unix
>        if (info.subsystem == SDL_SYSWM_X11) {
>          info.info.x11.lock_func();
>          XMoveWindow(info.info.x11.display, info.info.x11.wmwindow,
>                      m_pos_x, m_pos_y);
>          info.info.x11.unlock_func();
>        }
> #endif
>

-- 
There is a natural hootchy-kootchy to a goldfish.
		-- Walt Disney




More information about the SDL mailing list