Accessing internal X11 Display

I need to access the X11 Display* pointer used by SDL in order to go around the
SDL abstraction to communicate with a lower-level library.

The Display* is stored in current_video->hidden->X11_Display within SDL. I
cannot find a way to access current_video or get the Display* value directly
from SDL.

Suggestions?

-m=====
Morgan McGuire
@Morgan_McGuire


Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

Morgan McGuire wrote:

I need to access the X11 Display* pointer used by SDL in order to go around the
SDL abstraction to communicate with a lower-level library.

The Display* is stored in current_video->hidden->X11_Display within SDL. I
cannot find a way to access current_video or get the Display* value directly
from SDL.

Suggestions?

Morgan,

look in SDL_syswm.h there’s a system dependant struct that on unix
systems contains the Display pointer. To fill that struct do as follows:

SDL_SysWMinfo info;
SDL_VERSION( &info.version );
SDL_GetWMInfo( &info );

Hope that helps.–
Ignacio Casta?o
@Ignacio_Castano

SDL_SysWMinfo info;
SDL_VERSION( &info.version );
SDL_GetWMInfo( &info );
Ignacio Casta?o
castanyo at yahoo.es

Exactly what I needed! Thanks, Ignacio.

info.info.x11.display;

-m=====
Morgan McGuire
@Morgan_McGuire


Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools