src/video/SDL_video.c
changeset 12006 1b7ed3438a7f
parent 11954 bc2aba33ae1f
child 12017 d8a165136edf
equal deleted inserted replaced
12005:94f3f018d3eb 12006:1b7ed3438a7f
  1320     window->last_fullscreen_flags = window->flags;
  1320     window->last_fullscreen_flags = window->flags;
  1321     return 0;
  1321     return 0;
  1322 }
  1322 }
  1323 
  1323 
  1324 #define CREATE_FLAGS \
  1324 #define CREATE_FLAGS \
  1325     (SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_ALWAYS_ON_TOP | SDL_WINDOW_SKIP_TASKBAR | SDL_WINDOW_POPUP_MENU | SDL_WINDOW_UTILITY | SDL_WINDOW_TOOLTIP | SDL_WINDOW_VULKAN)
  1325     (SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_ALWAYS_ON_TOP | SDL_WINDOW_SKIP_TASKBAR | SDL_WINDOW_POPUP_MENU | SDL_WINDOW_UTILITY | SDL_WINDOW_TOOLTIP | SDL_WINDOW_VULKAN | SDL_WINDOW_MINIMIZED)
  1326 
  1326 
  1327 static void
  1327 static void
  1328 SDL_FinishWindowCreation(SDL_Window *window, Uint32 flags)
  1328 SDL_FinishWindowCreation(SDL_Window *window, Uint32 flags)
  1329 {
  1329 {
  1330     if (flags & SDL_WINDOW_MAXIMIZED) {
  1330     if (flags & SDL_WINDOW_MAXIMIZED) {
  1477 
  1477 
  1478     if (_this->CreateSDLWindow && _this->CreateSDLWindow(_this, window) < 0) {
  1478     if (_this->CreateSDLWindow && _this->CreateSDLWindow(_this, window) < 0) {
  1479         SDL_DestroyWindow(window);
  1479         SDL_DestroyWindow(window);
  1480         return NULL;
  1480         return NULL;
  1481     }
  1481     }
       
  1482 
       
  1483 	// Clear minimized if not on windows, only windows handles it at create rather than FinishWindowCreation,
       
  1484 	// but it's important or window focus will get broken on windows!
       
  1485 #if !defined(__WIN32__)
       
  1486 	if ( window->flags & SDL_WINDOW_MINIMIZED )
       
  1487 		window->flags &= ~SDL_WINDOW_MINIMIZED;
       
  1488 #endif
  1482 
  1489 
  1483 #if __WINRT__ && (NTDDI_VERSION < NTDDI_WIN10)
  1490 #if __WINRT__ && (NTDDI_VERSION < NTDDI_WIN10)
  1484     /* HACK: WinRT 8.x apps can't choose whether or not they are fullscreen
  1491     /* HACK: WinRT 8.x apps can't choose whether or not they are fullscreen
  1485        or not.  The user can choose this, via OS-provided UI, but this can't
  1492        or not.  The user can choose this, via OS-provided UI, but this can't
  1486        be set programmatically.
  1493        be set programmatically.