Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11window.c @ 4510:6f8175ad0335
Implemented X11 system window manager info for SDL 1.3. It's simple. Really.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 12 Jul 2010 01:20:57 -0700 |
parents | f78a602ac135 |
children | a956a315fe67 |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11window.c Mon Jul 12 00:49:26 2010 -0700 +++ b/src/video/x11/SDL_x11window.c Mon Jul 12 01:20:57 2010 -0700 @@ -1014,8 +1014,14 @@ SDL_bool X11_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) { - if (info->version.major <= SDL_MAJOR_VERSION) { - /* FIXME! */ + SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + Display *display = data->videodata->display; + + if (info->version.major == SDL_MAJOR_VERSION && + info->version.minor == SDL_MINOR_VERSION) { + info->subsystem = SDL_SYSWM_X11; + info->info.x11.display = display; + info->info.x11.window = data->xwindow; return SDL_TRUE; } else { SDL_SetError("Application not compiled with SDL %d.%d\n",