# HG changeset patch # User Sam Lantinga # Date 1278922857 25200 # Node ID 6f8175ad033563743fea8fdceece8f4c5be9ad07 # Parent 8e91c39472102f528b4a9a12eebd90418a4a1df5 Implemented X11 system window manager info for SDL 1.3. It's simple. Really. diff -r 8e91c3947210 -r 6f8175ad0335 include/SDL_syswm.h --- a/include/SDL_syswm.h Mon Jul 12 00:49:26 2010 -0700 +++ b/include/SDL_syswm.h Mon Jul 12 01:20:57 2010 -0700 @@ -106,24 +106,6 @@ { Display *display; /**< The X11 display */ Window window; /**< The X11 display window */ - /** - * These locking functions should be called around - * any X11 functions using the display variable. - * They lock the event thread, so should not be - * called around event functions or from event filters. - */ - /*@{*/ - void (*lock_func) (void); - void (*unlock_func) (void); - /*@}*/ - - /** - * Introduced in SDL 1.0.2. - */ - /*@{*/ - Window fswindow; /**< The X11 fullscreen window */ - Window wmwindow; /**< The X11 managed input window */ - /*@}*/ } x11; } info; }; diff -r 8e91c3947210 -r 6f8175ad0335 src/video/x11/SDL_x11window.c --- 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",