src/video/windows/SDL_windowswindow.c
changeset 6428 0028fa91dfc6
parent 6427 34059553702a
child 6430 48d519500f7e
equal deleted inserted replaced
6427:34059553702a 6428:0028fa91dfc6
   485 
   485 
   486 void
   486 void
   487 WIN_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
   487 WIN_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
   488 {
   488 {
   489     HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
   489     HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
   490     SetWindowLong(hwnd, GWL_STYLE, GetWindowStyle(window));
   490     DWORD style = GetWindowLong(hwnd, GWL_STYLE);
       
   491 
       
   492     if (bordered) {
       
   493         style &= ~STYLE_BORDERLESS;
       
   494         style |= STYLE_NORMAL;
       
   495     } else {
       
   496         style &= ~STYLE_NORMAL;
       
   497         style |= STYLE_BORDERLESS;
       
   498     }
       
   499 
       
   500     SetWindowLong(hwnd, GWL_STYLE, style);
       
   501     SetWindowPos(hwnd, hwnd, window->x, window->y, window->w, window->h, SWP_FRAMECHANGED | SWP_NOREPOSITION | SWP_NOZORDER |SWP_NOACTIVATE | SWP_NOSENDCHANGING);
   491 }
   502 }
   492 
   503 
   493 void
   504 void
   494 WIN_RestoreWindow(_THIS, SDL_Window * window)
   505 WIN_RestoreWindow(_THIS, SDL_Window * window)
   495 {
   506 {