Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Get the correct screen bounds from xinerama
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 28, 2012
1 parent 633433e commit bbbe1ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/video/x11/SDL_x11modes.c
Expand Up @@ -217,6 +217,7 @@ X11_InitModes(_THIS)
displaydata->screen = 0;
displaydata->use_xinerama = xinerama_major * 100 + xinerama_minor;
displaydata->xinerama_info = xinerama[screen];
displaydata->xinerama_screen = screen;
}
else displaydata->screen = screen;
#else
Expand Down Expand Up @@ -642,8 +643,8 @@ get_real_resolution(Display * display, SDL_DisplayData * data, int *w, int *h,

/* Update the current screen layout information */
xinerama = XineramaQueryScreens(display, &screencount);
if (xinerama && data->screen < screencount) {
data->xinerama_info = xinerama[data->screen];
if (xinerama && data->xinerama_screen < screencount) {
data->xinerama_info = xinerama[data->xinerama_screen];
}
if (xinerama) XFree(xinerama);

Expand Down
1 change: 1 addition & 0 deletions src/video/x11/SDL_x11modes.h
Expand Up @@ -36,6 +36,7 @@ typedef struct

#if SDL_VIDEO_DRIVER_X11_XINERAMA
XineramaScreenInfo xinerama_info;
int xinerama_screen;
#endif
#if SDL_VIDEO_DRIVER_X11_XRANDR
XRRScreenConfiguration *screen_config;
Expand Down

0 comments on commit bbbe1ab

Please sign in to comment.