Fixed bug #258
authorSam Lantinga <slouken@libsdl.org>
Sat, 24 Jun 2006 04:30:01 +0000
changeset 1882 339d733e3699
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
--- a/src/video/windib/SDL_dibvideo.c	Sat Jun 24 03:41:14 2006 +0000
+++ b/src/video/windib/SDL_dibvideo.c	Sat Jun 24 04:30:01 2006 +0000
@@ -785,7 +785,7 @@
 		bounds.top = SDL_windowY;
 		bounds.right = SDL_windowX+video->w;
 		bounds.bottom = SDL_windowY+video->h;
-		AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
+		AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0);
 		width = bounds.right-bounds.left;
 		height = bounds.bottom-bounds.top;
 		if ( (flags & SDL_FULLSCREEN) ) {
--- a/src/video/windx5/SDL_dx5video.c	Sat Jun 24 03:41:14 2006 +0000
+++ b/src/video/windx5/SDL_dx5video.c	Sat Jun 24 04:30:01 2006 +0000
@@ -1195,7 +1195,7 @@
 			bounds.top = SDL_windowY;
 			bounds.right = SDL_windowX+video->w;
 			bounds.bottom = SDL_windowY+video->h;
-			AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
+			AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0);
 			width = bounds.right-bounds.left;
 			height = bounds.bottom-bounds.top;
 			if ( (flags & SDL_FULLSCREEN) ) {
@@ -1281,7 +1281,7 @@
 		bounds.top = 0;
 		bounds.right = GetSystemMetrics(SM_CXSCREEN);
 		bounds.bottom = GetSystemMetrics(SM_CYSCREEN);
-		AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
+		AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0);
 		SetWindowPos(SDL_Window, HWND_TOPMOST,
 			bounds.left, bounds.top, 
 			bounds.right - bounds.left,
@@ -1598,7 +1598,7 @@
 			bounds.top = SDL_windowY;
 			bounds.right = SDL_windowX+video->w;
 			bounds.bottom = SDL_windowY+video->h;
-			AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0);
+			AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), (GetMenu(SDL_Window) != NULL), 0);
 			width = bounds.right-bounds.left;
 			height = bounds.bottom-bounds.top;
 			if ( center ) {