diff -urN libsdl1.2-1.2.11.orig/src/video/SDL_video.c libsdl1.2-1.2.11/src/video/SDL_video.c --- libsdl1.2-1.2.11.orig/src/video/SDL_video.c 2006-05-01 09:02:48.000000000 +0100 +++ libsdl1.2-1.2.11/src/video/SDL_video.c 2007-04-27 22:53:04.000000000 +0100 @@ -1835,9 +1838,6 @@ #endif /* Return the final grab state */ - if ( mode >= SDL_GRAB_FULLSCREEN ) { - mode -= SDL_GRAB_FULLSCREEN; - } return(mode); } SDL_GrabMode SDL_WM_GrabInput(SDL_GrabMode mode) @@ -1852,22 +1852,12 @@ /* Return the current mode on query */ if ( mode == SDL_GRAB_QUERY ) { mode = video->input_grab; - if ( mode >= SDL_GRAB_FULLSCREEN ) { - mode -= SDL_GRAB_FULLSCREEN; - } return(mode); } #ifdef DEBUG_GRAB printf("SDL_WM_GrabInput(%d) ... ", mode); #endif - /* If the video surface is fullscreen, we always grab */ - if ( mode >= SDL_GRAB_FULLSCREEN ) { - mode -= SDL_GRAB_FULLSCREEN; - } - if ( SDL_VideoSurface && (SDL_VideoSurface->flags & SDL_FULLSCREEN) ) { - mode += SDL_GRAB_FULLSCREEN; - } return(SDL_WM_GrabInputRaw(mode)); } static SDL_GrabMode SDL_WM_GrabInputOff(void) diff -urN libsdl1.2-1.2.11.orig/src/video/x11/SDL_x11modes.c libsdl1.2-1.2.11/src/video/x11/SDL_x11modes.c --- libsdl1.2-1.2.11.orig/src/video/x11/SDL_x11modes.c 2006-06-20 06:18:57.000000000 +0100 +++ libsdl1.2-1.2.11/src/video/x11/SDL_x11modes.c 2007-04-28 17:16:49.000000000 +0100 @@ -509,7 +509,7 @@ /* Query Xinerama extention */ if ( CheckXinerama(this, &xinerama_major, &xinerama_minor) ) { /* Find out which screen is the desired one */ - int desired = 0; + int desired = -1; int screens; int w, h; SDL_NAME(XineramaScreenInfo) *xinerama; @@ -630,7 +630,7 @@ /* XVidMode */ if ( !use_xrandr && #if SDL_VIDEO_DRIVER_X11_XINERAMA - (!use_xinerama || xinerama_info.screen_number == 0) && + (!use_xinerama) && #endif CheckVidMode(this, &vm_major, &vm_minor) && SDL_NAME(XF86VidModeGetAllModeLines)(SDL_Display, SDL_Screen,&nmodes,&modes) ) @@ -894,7 +894,7 @@ int X11_ResizeFullScreen(_THIS) { - int x = 0, y = 0; + int x = 0, y = 0, ix = 0, iy = 0; int real_w, real_h; int screen_w; int screen_h; @@ -927,12 +927,19 @@ move_cursor_to(this, real_w/2, real_h/2); /* Center and reparent the drawing window */ - x = (real_w - window_w)/2; - y = (real_h - window_h)/2; - XReparentWindow(SDL_Display, SDL_Window, FSwindow, x, y); + ix = (real_w - window_w)/2; + iy = (real_h - window_h)/2; + XReparentWindow(SDL_Display, SDL_Window, FSwindow, ix, iy); /* FIXME: move the mouse to the old relative location */ XSync(SDL_Display, True); /* Flush spurious mode change events */ + } + +#if SDL_VIDEO_DRIVER_X11_XINERAMA + /* move wm window behind fullscreen window */ + XMoveResizeWindow(SDL_Display, WMwindow, x+ix, y+iy, window_w, window_h); +#endif + return(1); } @@ -1031,7 +1038,7 @@ XInstallColormap(SDL_Display, SDL_XColorMap); } if ( okay ) { - X11_GrabInputNoLock(this, this->input_grab | SDL_GRAB_FULLSCREEN); + X11_GrabInputNoLock(this, this->input_grab); } /* We may need to refresh the screen at this point (no backing store) @@ -1089,12 +1096,6 @@ XSync(SDL_Display, True); /* Flush spurious mode change events */ currently_fullscreen = 0; } - /* If we get popped out of fullscreen mode for some reason, input_grab - will still have the SDL_GRAB_FULLSCREEN flag set, since this is only - temporary. In this case, release the grab unless the input has been - explicitly grabbed. - */ - X11_GrabInputNoLock(this, this->input_grab & ~SDL_GRAB_FULLSCREEN); /* We may need to refresh the screen at this point (no backing store) We also don't get an event, which is why we explicitly refresh. */ diff -urN libsdl1.2-1.2.11.orig/src/video/x11/SDL_x11video.c libsdl1.2-1.2.11/src/video/x11/SDL_x11video.c --- libsdl1.2-1.2.11.orig/src/video/x11/SDL_x11video.c 2006-06-20 06:17:24.000000000 +0100 +++ libsdl1.2-1.2.11/src/video/x11/SDL_x11video.c 2007-04-28 18:02:59.000000000 +0100 @@ -668,7 +668,7 @@ } /* Respect the window caption style */ - if ( flags & SDL_NOFRAME ) { + if (( flags & SDL_NOFRAME ) || ( flags & SDL_FULLSCREEN )) { SDL_bool set; Atom WM_HINTS;