src/video/SDL_video.c
changeset 12006 1b7ed3438a7f
parent 11954 bc2aba33ae1f
child 12017 d8a165136edf
     1.1 --- a/src/video/SDL_video.c	Fri Jun 01 19:43:53 2018 -0700
     1.2 +++ b/src/video/SDL_video.c	Tue Jun 05 12:46:09 2018 -0700
     1.3 @@ -1322,7 +1322,7 @@
     1.4  }
     1.5  
     1.6  #define CREATE_FLAGS \
     1.7 -    (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)
     1.8 +    (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)
     1.9  
    1.10  static void
    1.11  SDL_FinishWindowCreation(SDL_Window *window, Uint32 flags)
    1.12 @@ -1480,6 +1480,13 @@
    1.13          return NULL;
    1.14      }
    1.15  
    1.16 +	// Clear minimized if not on windows, only windows handles it at create rather than FinishWindowCreation,
    1.17 +	// but it's important or window focus will get broken on windows!
    1.18 +#if !defined(__WIN32__)
    1.19 +	if ( window->flags & SDL_WINDOW_MINIMIZED )
    1.20 +		window->flags &= ~SDL_WINDOW_MINIMIZED;
    1.21 +#endif
    1.22 +
    1.23  #if __WINRT__ && (NTDDI_VERSION < NTDDI_WIN10)
    1.24      /* HACK: WinRT 8.x apps can't choose whether or not they are fullscreen
    1.25         or not.  The user can choose this, via OS-provided UI, but this can't