Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
4509:8e91c3947210 | 4510:6f8175ad0335 |
---|---|
1012 } | 1012 } |
1013 | 1013 |
1014 SDL_bool | 1014 SDL_bool |
1015 X11_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) | 1015 X11_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) |
1016 { | 1016 { |
1017 if (info->version.major <= SDL_MAJOR_VERSION) { | 1017 SDL_WindowData *data = (SDL_WindowData *) window->driverdata; |
1018 /* FIXME! */ | 1018 Display *display = data->videodata->display; |
1019 | |
1020 if (info->version.major == SDL_MAJOR_VERSION && | |
1021 info->version.minor == SDL_MINOR_VERSION) { | |
1022 info->subsystem = SDL_SYSWM_X11; | |
1023 info->info.x11.display = display; | |
1024 info->info.x11.window = data->xwindow; | |
1019 return SDL_TRUE; | 1025 return SDL_TRUE; |
1020 } else { | 1026 } else { |
1021 SDL_SetError("Application not compiled with SDL %d.%d\n", | 1027 SDL_SetError("Application not compiled with SDL %d.%d\n", |
1022 SDL_MAJOR_VERSION, SDL_MINOR_VERSION); | 1028 SDL_MAJOR_VERSION, SDL_MINOR_VERSION); |
1023 return SDL_FALSE; | 1029 return SDL_FALSE; |