Added an aborted try at making fullscreen work on Xinerama screen != 0

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40500
This commit is contained in:
Sam Lantinga 2002-09-30 00:35:25 +00:00
parent 9489d57f28
commit e001f91de4
2 changed files with 142 additions and 133 deletions

View file

@ -535,12 +535,19 @@ int X11_GetVideoModes(_THIS)
/* Query Xinerama extention */
if ( SDL_NAME(XineramaQueryExtension)(SDL_Display, &i, &i) &&
SDL_NAME(XineramaIsActive)(SDL_Display) ) {
/* Find out which screen is the zero'th one */
/* Find out which screen is the desired one */
int desired = 0;
int screens;
SDL_NAME(XineramaScreenInfo) *xinerama;
#ifdef XINERAMA_DEBUG
printf("X11 detected Xinerama:\n");
#endif
#if 0 /* Apparently the vidmode extension doesn't work with Xinerama */
const char *variable = getenv("SDL_VIDEO_X11_XINERAMA_SCREEN");
if ( variable ) {
desired = atoi(variable);
}
#endif
xinerama = SDL_NAME(XineramaQueryScreens)(SDL_Display, &screens);
for ( i = 0; i < screens; i++ ) {
@ -550,7 +557,7 @@ int X11_GetVideoModes(_THIS)
xinerama[i].width, xinerama[i].height,
xinerama[i].x_org, xinerama[i].y_org);
#endif
if ( xinerama[i].screen_number == 0 ) {
if ( xinerama[i].screen_number == desired ) {
xinerama_x = xinerama[i].x_org;
xinerama_y = xinerama[i].y_org;
}
@ -672,7 +679,8 @@ int X11_EnterFullScreen(_THIS)
if ( current_h > real_h ) {
real_h = MAX(real_h, screen_h);
}
XMoveResizeWindow(SDL_Display, FSwindow, 0, 0, real_w, real_h);
XMoveResizeWindow(SDL_Display, FSwindow,
xinerama_x, xinerama_y, real_w, real_h);
XMapRaised(SDL_Display, FSwindow);
X11_WaitMapped(this, FSwindow);

View file

@ -282,7 +282,8 @@ static void create_aux_windows(_THIS)
xattr.border_pixel = 0;
xattr.colormap = SDL_XColorMap;
FSwindow = XCreateWindow(SDL_Display, SDL_Root, 0, 0, 32, 32, 0,
FSwindow = XCreateWindow(SDL_Display, SDL_Root,
xinerama_x, xinerama_y, 32, 32, 0,
this->hidden->depth, InputOutput, SDL_Visual,
CWOverrideRedirect | CWBackPixel | CWBorderPixel
| CWColormap,