src/video/windows/SDL_windowswindow.c
changeset 8817 13003597b6c4
parent 8778 d67a044fbec6
child 8905 1519c462cee6
     1.1 --- a/src/video/windows/SDL_windowswindow.c	Wed Jun 04 10:56:17 2014 -0700
     1.2 +++ b/src/video/windows/SDL_windowswindow.c	Wed Jun 04 10:56:30 2014 -0700
     1.3 @@ -108,9 +108,9 @@
     1.4      x = window->x + rect.left;
     1.5      y = window->y + rect.top;
     1.6  
     1.7 -    data->expected_resize = TRUE;
     1.8 -    SetWindowPos(hwnd, top, x, y, w, h, flags);
     1.9 -    data->expected_resize = FALSE;
    1.10 +    data->expected_resize = SDL_TRUE;
    1.11 +    SetWindowPos( hwnd, top, x, y, w, h, flags );
    1.12 +    data->expected_resize = SDL_FALSE;
    1.13  }
    1.14  
    1.15  static int
    1.16 @@ -470,9 +470,9 @@
    1.17  {
    1.18      SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
    1.19      HWND hwnd = data->hwnd;
    1.20 -    data->expected_resize = TRUE;
    1.21 +    data->expected_resize = SDL_TRUE;
    1.22      ShowWindow(hwnd, SW_MAXIMIZE);
    1.23 -    data->expected_resize = FALSE;
    1.24 +    data->expected_resize = SDL_FALSE;
    1.25  }
    1.26  
    1.27  void
    1.28 @@ -485,7 +485,8 @@
    1.29  void
    1.30  WIN_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
    1.31  {
    1.32 -    HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
    1.33 +    SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
    1.34 +    HWND hwnd = data->hwnd;
    1.35      DWORD style = GetWindowLong(hwnd, GWL_STYLE);
    1.36  
    1.37      if (bordered) {
    1.38 @@ -496,8 +497,10 @@
    1.39          style |= STYLE_BORDERLESS;
    1.40      }
    1.41  
    1.42 -    SetWindowLong(hwnd, GWL_STYLE, style);
    1.43 -    WIN_SetWindowPositionInternal(_this, window, SWP_NOCOPYBITS | SWP_FRAMECHANGED | SWP_NOREPOSITION | SWP_NOZORDER |SWP_NOACTIVATE | SWP_NOSENDCHANGING);
    1.44 +    data->in_border_change = SDL_TRUE;
    1.45 +    SetWindowLong( hwnd, GWL_STYLE, style );
    1.46 +    WIN_SetWindowPositionInternal(_this, window, SWP_NOCOPYBITS | SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOACTIVATE);
    1.47 +    data->in_border_change = SDL_FALSE;
    1.48  }
    1.49  
    1.50  void
    1.51 @@ -505,9 +508,9 @@
    1.52  {
    1.53      SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
    1.54      HWND hwnd = data->hwnd;
    1.55 -    data->expected_resize = TRUE;
    1.56 +    data->expected_resize = SDL_TRUE;
    1.57      ShowWindow(hwnd, SW_RESTORE);
    1.58 -    data->expected_resize = FALSE;
    1.59 +    data->expected_resize = SDL_FALSE;
    1.60  }
    1.61  
    1.62  void
    1.63 @@ -553,9 +556,9 @@
    1.64          y = window->windowed.y + rect.top;
    1.65      }
    1.66      SetWindowLong(hwnd, GWL_STYLE, style);
    1.67 -    data->expected_resize = TRUE;
    1.68 +    data->expected_resize = SDL_TRUE;
    1.69      SetWindowPos(hwnd, top, x, y, w, h, SWP_NOCOPYBITS | SWP_NOACTIVATE);
    1.70 -    data->expected_resize = FALSE;
    1.71 +    data->expected_resize = SDL_FALSE;
    1.72  }
    1.73  
    1.74  int