SDL:
authorSam Lantinga <slouken@libsdl.org>
Mon, 09 Apr 2018 10:37:31 -0700
changeset 1193969afb0599152
parent 11938 fbfacc66c65c
child 11940 bfb936894a9d
SDL:

On Windows, have SDL_ShowWindow() not activate the window if the window has the WS_EX_NOACTIVATE window flag.
src/video/windows/SDL_windowswindow.c
     1.1 --- a/src/video/windows/SDL_windowswindow.c	Mon Mar 26 12:38:29 2018 -0700
     1.2 +++ b/src/video/windows/SDL_windowswindow.c	Mon Apr 09 10:37:31 2018 -0700
     1.3 @@ -546,8 +546,17 @@
     1.4  void
     1.5  WIN_ShowWindow(_THIS, SDL_Window * window)
     1.6  {
     1.7 -    HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
     1.8 -    ShowWindow(hwnd, SW_SHOW);
     1.9 +	DWORD style;
    1.10 +	HWND hwnd;
    1.11 +	int nCmdShow;
    1.12 +	
    1.13 +	hwnd = ( (SDL_WindowData *)window->driverdata )->hwnd;
    1.14 +	nCmdShow = SW_SHOW;
    1.15 +	style = GetWindowLong(hwnd, GWL_EXSTYLE);
    1.16 +	if ( style & WS_EX_NOACTIVATE )
    1.17 +		nCmdShow = SW_SHOWNOACTIVATE;
    1.18 +	
    1.19 +    ShowWindow(hwnd, nCmdShow );
    1.20  }
    1.21  
    1.22  void