Simply resize existing window
authorPatrice Mandin <patmandin@gmail.com>
Sat, 26 May 2007 20:10:49 +0000
changeset 2107757dfb38f574
parent 2106 2714a8976e37
child 2108 a930c8e4d8b0
Simply resize existing window
src/video/gem/SDL_gemvideo.c
     1.1 --- a/src/video/gem/SDL_gemvideo.c	Sat May 26 19:46:04 2007 +0000
     1.2 +++ b/src/video/gem/SDL_gemvideo.c	Sat May 26 20:10:49 2007 +0000
     1.3 @@ -805,19 +805,10 @@
     1.4              /* Open the window */
     1.5              wind_open(GEM_handle, x2, y2, w2, h2);
     1.6          } else {
     1.7 -            /* Resize window if needed, to fit asked video mode */
     1.8 -            if (modeflags & SDL_RESIZABLE) {
     1.9 -                wind_get(GEM_handle, WF_WORKXYWH, &x2, &y2, &w2, &h2);
    1.10 -                if ((w2 & 15) != 0) {
    1.11 -                    w2 = (w2 | 15) + 1;
    1.12 -                }
    1.13 -                if ((w2 != width) || (h2 != height)) {
    1.14 -                    if (wind_calc
    1.15 -                        (WC_BORDER, GEM_win_type, x2, y2, width,
    1.16 -                         height, &x2, &y2, &w2, &h2)) {
    1.17 -                        wind_set(GEM_handle, WF_CURRXYWH, x2, y2, w2, h2);
    1.18 -                    }
    1.19 -                }
    1.20 +            /* Resize window to fit asked video mode */
    1.21 +            wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2);
    1.22 +            if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width,height, &x2,&y2,&w2,&h2)) {
    1.23 +                wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2);
    1.24              }
    1.25          }
    1.26