Get the correct screen bounds from xinerama
authorSam Lantinga
Fri, 28 Sep 2012 14:22:18 -0700
changeset 6506305f0fcc0e99
parent 6505 ce7abf273d8c
child 6507 42acda949dfb
Get the correct screen bounds from xinerama
src/video/x11/SDL_x11modes.c
src/video/x11/SDL_x11modes.h
     1.1 --- a/src/video/x11/SDL_x11modes.c	Fri Sep 28 14:21:15 2012 -0700
     1.2 +++ b/src/video/x11/SDL_x11modes.c	Fri Sep 28 14:22:18 2012 -0700
     1.3 @@ -217,6 +217,7 @@
     1.4              displaydata->screen = 0;
     1.5              displaydata->use_xinerama = xinerama_major * 100 + xinerama_minor;
     1.6              displaydata->xinerama_info = xinerama[screen];
     1.7 +            displaydata->xinerama_screen = screen;
     1.8          }
     1.9          else displaydata->screen = screen;
    1.10  #else
    1.11 @@ -642,8 +643,8 @@
    1.12  
    1.13          /* Update the current screen layout information */
    1.14          xinerama = XineramaQueryScreens(display, &screencount);
    1.15 -        if (xinerama && data->screen < screencount) {
    1.16 -            data->xinerama_info = xinerama[data->screen];
    1.17 +        if (xinerama && data->xinerama_screen < screencount) {
    1.18 +            data->xinerama_info = xinerama[data->xinerama_screen];
    1.19          }
    1.20          if (xinerama) XFree(xinerama);
    1.21  
     2.1 --- a/src/video/x11/SDL_x11modes.h	Fri Sep 28 14:21:15 2012 -0700
     2.2 +++ b/src/video/x11/SDL_x11modes.h	Fri Sep 28 14:22:18 2012 -0700
     2.3 @@ -36,6 +36,7 @@
     2.4  
     2.5  #if SDL_VIDEO_DRIVER_X11_XINERAMA
     2.6      XineramaScreenInfo xinerama_info;
     2.7 +    int xinerama_screen;
     2.8  #endif
     2.9  #if SDL_VIDEO_DRIVER_X11_XRANDR
    2.10      XRRScreenConfiguration *screen_config;