Fixed bug #725 SDL-1.2
authorSam Lantinga
Sun, 27 Sep 2009 06:20:27 +0000
branchSDL-1.2
changeset 4250c483b474b1cf
parent 4249 429c8dd3175d
child 4251 ed5e32187eec
Fixed bug #725

Don't let windows reposition the fullscreen window.
src/video/wincommon/SDL_sysevents.c
     1.1 --- a/src/video/wincommon/SDL_sysevents.c	Sun Sep 27 05:18:43 2009 +0000
     1.2 +++ b/src/video/wincommon/SDL_sysevents.c	Sun Sep 27 06:20:27 2009 +0000
     1.3 @@ -588,6 +588,22 @@
     1.4  		return(0);
     1.5  #endif /* WM_GETMINMAXINFO */
     1.6  
     1.7 +		case WM_WINDOWPOSCHANGING: {
     1.8 +			WINDOWPOS *windowpos = (WINDOWPOS*)lParam;
     1.9 +
    1.10 +			/* When menu is at the side or top, Windows likes
    1.11 +			   to try to reposition the fullscreen window when
    1.12 +			   changing video modes.
    1.13 +			 */
    1.14 +			if ( !SDL_resizing &&
    1.15 +			     SDL_PublicSurface &&
    1.16 +			     (SDL_PublicSurface->flags & SDL_FULLSCREEN) ) {
    1.17 +				windowpos->x = 0;
    1.18 +				windowpos->y = 0;
    1.19 +			}
    1.20 +		}
    1.21 +		return(0);
    1.22 +
    1.23  		case WM_WINDOWPOSCHANGED: {
    1.24  			SDL_VideoDevice *this = current_video;
    1.25  			int w, h;