Implemented SDL_WINDOW_SKIP_TASKBAR on Windows
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index 6288f8a..f0f04e9 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -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");