Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SDL:
On Windows, have SDL_ShowWindow() not activate the window if the window has the WS_EX_NOACTIVATE window flag.
  • Loading branch information
slouken committed Apr 9, 2018
1 parent 4d78a99 commit 6a0ef0c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/video/windows/SDL_windowswindow.c
Expand Up @@ -546,8 +546,17 @@ WIN_GetWindowBordersSize(_THIS, SDL_Window * window, int *top, int *left, int *b
void
WIN_ShowWindow(_THIS, SDL_Window * window)
{
HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
ShowWindow(hwnd, SW_SHOW);
DWORD style;
HWND hwnd;
int nCmdShow;

hwnd = ( (SDL_WindowData *)window->driverdata )->hwnd;
nCmdShow = SW_SHOW;
style = GetWindowLong(hwnd, GWL_EXSTYLE);
if ( style & WS_EX_NOACTIVATE )
nCmdShow = SW_SHOWNOACTIVATE;

ShowWindow(hwnd, nCmdShow );
}

void
Expand Down

0 comments on commit 6a0ef0c

Please sign in to comment.