X and SDL

So, i’m new in SDL Programming …

I try to get window attributes of SDL window like this …----------------------
if(SDL_GetWMInfo(&info)) {
Window window;
Display *display;
info.info.x11.lock_func();
parent = info.info.x11.window;
display = info.info.x11.display;
XGetWindowAttributes(display, window,&pattr);
info.info.x11.unlock_func();
}

and the SDL Error is :

Fatal signal: Segmentation Fault (SDL Parachute Deployed) …

the SIGSEV signal is sent when XGetWindowAttributes is called …

thanks.

Have you called SDL_Init() yet?On Wed, 2002-09-04 at 07:04, ol wrote:

the SIGSEV signal is sent when XGetWindowAttributes is called …

DrEvil wrote:> On Wed, 2002-09-04 at 07:04, ol wrote:

the SIGSEV signal is sent when XGetWindowAttributes is called …

Have you called SDL_Init() yet?

yes …

tanks, i solved my problem :slight_smile: