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 1705fc731a7d83ed
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
     1.1 --- a/src/video/windib/SDL_dibvideo.c	Sat Jun 24 03:43:21 2006 +0000
     1.2 +++ b/src/video/windib/SDL_dibvideo.c	Sat Jun 24 04:31:42 2006 +0000
     1.3 @@ -805,7 +805,7 @@
     1.4          bounds.right = SDL_windowX + video->w;
     1.5          bounds.bottom = SDL_windowY + video->h;
     1.6          AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE),
     1.7 -                           FALSE, 0);
     1.8 +                           (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:43:21 2006 +0000
     2.2 +++ b/src/video/windx5/SDL_dx5video.c	Sat Jun 24 04:31:42 2006 +0000
     2.3 @@ -1225,9 +1225,8 @@
     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,
     2.8 -                               GetWindowLong(SDL_Window, GWL_STYLE),
     2.9 -                               FALSE, 0);
    2.10 +            AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE),
    2.11 +                               (GetMenu(SDL_Window) != NULL), 0);
    2.12              width = bounds.right - bounds.left;
    2.13              height = bounds.bottom - bounds.top;
    2.14              if ((flags & SDL_FULLSCREEN)) {
    2.15 @@ -1315,10 +1314,10 @@
    2.16          bounds.right = GetSystemMetrics(SM_CXSCREEN);
    2.17          bounds.bottom = GetSystemMetrics(SM_CYSCREEN);
    2.18          AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE),
    2.19 -                           FALSE, 0);
    2.20 +                           (GetMenu(SDL_Window) != NULL), 0);
    2.21          SetWindowPos(SDL_Window, HWND_TOPMOST, bounds.left, bounds.top,
    2.22 -                     bounds.right - bounds.left,
    2.23 -                     bounds.bottom - bounds.top, SWP_NOCOPYBITS);
    2.24 +                     bounds.right - bounds.left, bounds.bottom - bounds.top,
    2.25 +                     SWP_NOCOPYBITS);
    2.26          ShowWindow(SDL_Window, SW_SHOW);
    2.27          while (GetForegroundWindow() != SDL_Window) {
    2.28              SetForegroundWindow(SDL_Window);
    2.29 @@ -1635,9 +1634,8 @@
    2.30              bounds.top = SDL_windowY;
    2.31              bounds.right = SDL_windowX + video->w;
    2.32              bounds.bottom = SDL_windowY + video->h;
    2.33 -            AdjustWindowRectEx(&bounds,
    2.34 -                               GetWindowLong(SDL_Window, GWL_STYLE),
    2.35 -                               FALSE, 0);
    2.36 +            AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE),
    2.37 +                               (GetMenu(SDL_Window) != NULL), 0);
    2.38              width = bounds.right - bounds.left;
    2.39              height = bounds.bottom - bounds.top;
    2.40              if (center) {