Merged fix for bug #258 from SDL 1.2 SDL-1.3
authorSam Lantinga <slouken@libsdl.org>
Sat, 24 Jun 2006 04:31:42 +0000
branchSDL-1.3
changeset 1705 fc731a7d83ed
parent 1704 03fb364e3283
child 1706 1577404809f0
Merged fix for bug #258 from SDL 1.2
src/video/windib/SDL_dibvideo.c
src/video/windx5/SDL_dx5video.c
--- a/src/video/windib/SDL_dibvideo.c	Sat Jun 24 03:43:21 2006 +0000
+++ b/src/video/windib/SDL_dibvideo.c	Sat Jun 24 04:31:42 2006 +0000
@@ -805,7 +805,7 @@
         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)) {
--- a/src/video/windx5/SDL_dx5video.c	Sat Jun 24 03:43:21 2006 +0000
+++ b/src/video/windx5/SDL_dx5video.c	Sat Jun 24 04:31:42 2006 +0000
@@ -1225,9 +1225,8 @@
             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 @@
         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 @@
             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) {