src/video/windows/SDL_windowswindow.c
changeset 6078 718b49ec039e
parent 6044 35448a5ea044
child 6138 4c64952a58fb
equal deleted inserted replaced
6077:ee00e4b80f79 6078:718b49ec039e
    53 static DWORD
    53 static DWORD
    54 GetWindowStyle(SDL_Window * window)
    54 GetWindowStyle(SDL_Window * window)
    55 {
    55 {
    56     DWORD style = 0;
    56     DWORD style = 0;
    57 
    57 
    58 	if (window->flags & SDL_WINDOW_FULLSCREEN) {
    58     if (window->flags & SDL_WINDOW_FULLSCREEN) {
    59         style |= STYLE_FULLSCREEN;
    59         style |= STYLE_FULLSCREEN;
    60 	} else {
    60     } else {
    61 		if (window->flags & SDL_WINDOW_BORDERLESS) {
    61         if (window->flags & SDL_WINDOW_BORDERLESS) {
    62             style |= STYLE_BORDERLESS;
    62             style |= STYLE_BORDERLESS;
    63 		} else {
    63         } else {
    64             style |= STYLE_NORMAL;
    64             style |= STYLE_NORMAL;
    65 		}
    65         }
    66 		if (window->flags & SDL_WINDOW_RESIZABLE) {
    66         if (window->flags & SDL_WINDOW_RESIZABLE) {
    67             style |= STYLE_RESIZABLE;
    67             style |= STYLE_RESIZABLE;
    68 		}
    68         }
    69 	}
    69     }
    70     return style;
    70     return style;
    71 }
    71 }
    72 
    72 
    73 static int
    73 static int
    74 SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
    74 SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
   179             ClientToScreen(hwnd, (LPPOINT) & rect + 1);
   179             ClientToScreen(hwnd, (LPPOINT) & rect + 1);
   180             ClipCursor(&rect);
   180             ClipCursor(&rect);
   181         }
   181         }
   182     }
   182     }
   183 
   183 
   184 	/* Enable multi-touch */
   184     /* Enable multi-touch */
   185     if (videodata->RegisterTouchWindow) {
   185     if (videodata->RegisterTouchWindow) {
   186         videodata->RegisterTouchWindow(hwnd, (TWF_FINETOUCH|TWF_WANTPALM));
   186         videodata->RegisterTouchWindow(hwnd, (TWF_FINETOUCH|TWF_WANTPALM));
   187     }
   187     }
   188 
   188 
   189     /* All done! */
   189     /* All done! */
   632 {
   632 {
   633     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
   633     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
   634 
   634 
   635     if (data) {
   635     if (data) {
   636 #ifdef _WIN32_WCE
   636 #ifdef _WIN32_WCE
   637 	WINCE_ShowWindow(_this, window, 0);
   637         WINCE_ShowWindow(_this, window, 0);
   638 #endif
   638 #endif
   639         ReleaseDC(data->hwnd, data->hdc);
   639         ReleaseDC(data->hwnd, data->hdc);
   640         if (data->created) {
   640         if (data->created) {
   641             DestroyWindow(data->hwnd);
   641             DestroyWindow(data->hwnd);
   642         } else {
   642         } else {