Window coordinates are in the global space and windows are not tied to a particular display.

Also added Ctrl-Enter keybinding to the test code to toggle fullscreen mode for testing.
This commit is contained in:
Sam Lantinga 2011-02-10 14:44:25 -08:00
parent 2c021d9b34
commit 018af55e16
21 changed files with 300 additions and 190 deletions

View file

@ -380,7 +380,7 @@ X11_GL_CreateContext(_THIS, SDL_Window * window)
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
int screen =
((SDL_DisplayData *) window->display->driverdata)->screen;
((SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata)->screen;
XWindowAttributes xattr;
XVisualInfo v, *vinfo;
int n;