From 733dca54f3b700b3e09ce85f3db3b2a2a53bd9d6 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 24 Jun 2006 04:31:42 +0000 Subject: [PATCH] Merged fix for bug #258 from SDL 1.2 --- src/video/windib/SDL_dibvideo.c | 2 +- src/video/windx5/SDL_dx5video.c | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/video/windib/SDL_dibvideo.c b/src/video/windib/SDL_dibvideo.c index 741bed072..dde097d6d 100644 --- a/src/video/windib/SDL_dibvideo.c +++ b/src/video/windib/SDL_dibvideo.c @@ -805,7 +805,7 @@ DIB_SetVideoMode(_THIS, SDL_Surface * current, bounds.right = SDL_windowX + video->w; bounds.bottom = SDL_windowY + video->h; AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), - FALSE, 0); + (GetMenu(SDL_Window) != NULL), 0); width = bounds.right - bounds.left; height = bounds.bottom - bounds.top; if ((flags & SDL_FULLSCREEN)) { diff --git a/src/video/windx5/SDL_dx5video.c b/src/video/windx5/SDL_dx5video.c index 48f13057d..bca6483d1 100644 --- a/src/video/windx5/SDL_dx5video.c +++ b/src/video/windx5/SDL_dx5video.c @@ -1225,9 +1225,8 @@ DX5_SetVideoMode(_THIS, SDL_Surface * current, 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)) { @@ -1315,10 +1314,10 @@ DX5_SetVideoMode(_THIS, SDL_Surface * current, bounds.right = GetSystemMetrics(SM_CXSCREEN); bounds.bottom = GetSystemMetrics(SM_CYSCREEN); AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), - FALSE, 0); + (GetMenu(SDL_Window) != NULL), 0); SetWindowPos(SDL_Window, HWND_TOPMOST, bounds.left, bounds.top, - bounds.right - bounds.left, - bounds.bottom - bounds.top, SWP_NOCOPYBITS); + bounds.right - bounds.left, bounds.bottom - bounds.top, + SWP_NOCOPYBITS); ShowWindow(SDL_Window, SW_SHOW); while (GetForegroundWindow() != SDL_Window) { SetForegroundWindow(SDL_Window); @@ -1635,9 +1634,8 @@ DX5_SetVideoMode(_THIS, SDL_Surface * current, 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) {