Implemented SDL_WINDOW_SKIP_TASKBAR on Windows

Sam Lantinga 2017-06-16 09:10:13 -07:00
parent a725efa4bc
commit 0a75192d85
1 changed files with 7 additions and 3 deletions

View File

@ -91,7 +91,7 @@ WIN_SetWindowPositionInternal(_THIS, SDL_Window * window, UINT flags)
int w, h;
/* Figure out what the window area will be */
if (SDL_ShouldAllowTopmost() && ((window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS)) == (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS) || window->flags & SDL_WINDOW_ALWAYS_ON_TOP)) {
if (SDL_ShouldAllowTopmost() && ((window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS)) == (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS) || (window->flags & SDL_WINDOW_ALWAYS_ON_TOP))) {
top = HWND_TOPMOST;
} else {
top = HWND_NOTOPMOST;
@ -268,12 +268,16 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
int
WIN_CreateWindow(_THIS, SDL_Window * window)
{
HWND hwnd;
HWND hwnd, parent = NULL;
RECT rect;
DWORD style = STYLE_BASIC;
int x, y;
int w, h;
if (window->flags & SDL_WINDOW_SKIP_TASKBAR) {
parent = CreateWindow(SDL_Appname, TEXT(""), STYLE_BASIC, 0, 0, 32, 32, NULL, NULL, SDL_Instance, NULL);
}
style |= GetWindowStyle(window);
/* Figure out what the window area will be */
@ -288,7 +292,7 @@ WIN_CreateWindow(_THIS, SDL_Window * window)
h = (rect.bottom - rect.top);
hwnd =
CreateWindow(SDL_Appname, TEXT(""), style, x, y, w, h, NULL, NULL,
CreateWindow(SDL_Appname, TEXT(""), style, x, y, w, h, parent, NULL,
SDL_Instance, NULL);
if (!hwnd) {
return WIN_SetError("Couldn't create window");