Fixed bug #258
authorSam Lantinga <slouken@libsdl.org>
Sat, 24 Jun 2006 04:30:01 +0000
changeset 1882339d733e3699
parent 1881 61f86f36afb9
child 1883 2780f547f5e7
Fixed bug #258

Account for the menu height in AdjustWindowRectEx()
src/video/windib/SDL_dibvideo.c
src/video/windx5/SDL_dx5video.c
     1.1 --- a/src/video/windib/SDL_dibvideo.c	Sat Jun 24 03:41:14 2006 +0000
     1.2 +++ b/src/video/windib/SDL_dibvideo.c	Sat Jun 24 04:30:01 2006 +0000
     1.3 @@ -785,7 +785,7 @@
     1.4  		bounds.top = SDL_windowY;
     1.5  		bounds.right = SDL_windowX+video->w;
     1.6  		bounds.bottom = SDL_windowY+video->h;
     1.7 -		AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
     1.8 +		AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0);
     1.9  		width = bounds.right-bounds.left;
    1.10  		height = bounds.bottom-bounds.top;
    1.11  		if ( (flags & SDL_FULLSCREEN) ) {
     2.1 --- a/src/video/windx5/SDL_dx5video.c	Sat Jun 24 03:41:14 2006 +0000
     2.2 +++ b/src/video/windx5/SDL_dx5video.c	Sat Jun 24 04:30:01 2006 +0000
     2.3 @@ -1195,7 +1195,7 @@
     2.4  			bounds.top = SDL_windowY;
     2.5  			bounds.right = SDL_windowX+video->w;
     2.6  			bounds.bottom = SDL_windowY+video->h;
     2.7 -			AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
     2.8 +			AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0);
     2.9  			width = bounds.right-bounds.left;
    2.10  			height = bounds.bottom-bounds.top;
    2.11  			if ( (flags & SDL_FULLSCREEN) ) {
    2.12 @@ -1281,7 +1281,7 @@
    2.13  		bounds.top = 0;
    2.14  		bounds.right = GetSystemMetrics(SM_CXSCREEN);
    2.15  		bounds.bottom = GetSystemMetrics(SM_CYSCREEN);
    2.16 -		AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
    2.17 +		AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0);
    2.18  		SetWindowPos(SDL_Window, HWND_TOPMOST,
    2.19  			bounds.left, bounds.top, 
    2.20  			bounds.right - bounds.left,
    2.21 @@ -1598,7 +1598,7 @@
    2.22  			bounds.top = SDL_windowY;
    2.23  			bounds.right = SDL_windowX+video->w;
    2.24  			bounds.bottom = SDL_windowY+video->h;
    2.25 -			AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
    2.26 +			AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0);
    2.27  			width = bounds.right-bounds.left;
    2.28  			height = bounds.bottom-bounds.top;
    2.29  			if ( center ) {