src/video/windows/SDL_windowsevents.c
changeset 6788 036f53f2f5aa
parent 6782 582d35419e8a
child 6837 a69e10925a58
     1.1 --- a/src/video/windows/SDL_windowsevents.c	Mon Dec 31 11:07:46 2012 -0800
     1.2 +++ b/src/video/windows/SDL_windowsevents.c	Mon Dec 31 12:15:25 2012 -0800
     1.3 @@ -447,6 +447,7 @@
     1.4              int x, y;
     1.5              int w, h;
     1.6              int min_w, min_h;
     1.7 +            int max_w, max_h;
     1.8              int style;
     1.9              BOOL menu;
    1.10  
    1.11 @@ -462,11 +463,14 @@
    1.12              /* Calculate current size of our window */
    1.13              SDL_GetWindowSize(data->window, &w, &h);
    1.14              SDL_GetWindowMinimumSize(data->window, &min_w, &min_h);
    1.15 +            SDL_GetWindowMaximumSize(data->window, &max_w, &max_h);
    1.16  
    1.17              /* Store in min_w and min_h difference between current size and minimal 
    1.18                 size so we don't need to call AdjustWindowRectEx twice */
    1.19              min_w -= w;
    1.20              min_h -= h;
    1.21 +            max_w -= w;
    1.22 +            max_h -= h;
    1.23  
    1.24              size.top = 0;
    1.25              size.left = 0;
    1.26 @@ -489,6 +493,8 @@
    1.27              if (SDL_GetWindowFlags(data->window) & SDL_WINDOW_RESIZABLE) {
    1.28                  info->ptMinTrackSize.x = w + min_w;
    1.29                  info->ptMinTrackSize.y = h + min_h;
    1.30 +                info->ptMaxTrackSize.x = w + max_w;
    1.31 +                info->ptMaxTrackSize.y = h + max_h;
    1.32              } else {
    1.33                  info->ptMaxSize.x = w;
    1.34                  info->ptMaxSize.y = h;