src/video/windows/SDL_windowswindow.c
changeset 12006 1b7ed3438a7f
parent 11939 69afb0599152
child 12067 0e37a23d93cb
     1.1 --- a/src/video/windows/SDL_windowswindow.c	Fri Jun 01 19:43:53 2018 -0700
     1.2 +++ b/src/video/windows/SDL_windowswindow.c	Tue Jun 05 12:46:09 2018 -0700
     1.3 @@ -97,6 +97,10 @@
     1.4          if (window->flags & SDL_WINDOW_RESIZABLE) {
     1.5              style |= STYLE_RESIZABLE;
     1.6          }
     1.7 +
     1.8 +		/* Need to set initialize minimize style, or when we call ShowWindow with WS_MINIMIZE it will activate a random window */
     1.9 +		if ( window->flags & SDL_WINDOW_MINIMIZED )
    1.10 +			style |= WS_MINIMIZE;
    1.11      }
    1.12      return style;
    1.13  }
    1.14 @@ -335,6 +339,9 @@
    1.15      /* Inform Windows of the frame change so we can respond to WM_NCCALCSIZE */
    1.16      SetWindowPos(hwnd, NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
    1.17  
    1.18 +	if ( window->flags & SDL_WINDOW_MINIMIZED )
    1.19 +		ShowWindow( hwnd, SW_SHOWMINNOACTIVE );
    1.20 +
    1.21      if (!(window->flags & SDL_WINDOW_OPENGL)) {
    1.22          return 0;
    1.23      }