mirror of https://github.com/libsdl-org/SDL
The SDL_WINDOW_SKIP_TASKBAR flag has been replaced by the SDL_WINDOW_UTILITY flag
The SDL_WINDOW_UTILITY flag has the same functionality, and is now implemented on Windows.
This commit is contained in:
parent
675fc8c38f
commit
8da9b22c17
|
@ -2673,3 +2673,7 @@ typedef SDL_cond, SDL_Condition;
|
||||||
- SDL_GetDisplayOrientation
|
- SDL_GetDisplayOrientation
|
||||||
+ SDL_GetDisplayCurrentOrientation
|
+ SDL_GetDisplayCurrentOrientation
|
||||||
(...)
|
(...)
|
||||||
|
@@
|
||||||
|
@@
|
||||||
|
- SDL_WINDOW_SKIP_TASKBAR
|
||||||
|
+ SDL_WINDOW_UTILITY
|
||||||
|
|
|
@ -1096,6 +1096,8 @@ The SDL_WINDOWPOS_UNDEFINED_DISPLAY() and SDL_WINDOWPOS_CENTERED_DISPLAY() macro
|
||||||
|
|
||||||
The SDL_WINDOW_SHOWN flag has been removed. Windows are shown by default and can be created hidden by using the SDL_WINDOW_HIDDEN flag.
|
The SDL_WINDOW_SHOWN flag has been removed. Windows are shown by default and can be created hidden by using the SDL_WINDOW_HIDDEN flag.
|
||||||
|
|
||||||
|
The SDL_WINDOW_SKIP_TASKBAR flag has been replaced by the SDL_WINDOW_UTILITY flag, which has the same functionality.
|
||||||
|
|
||||||
SDL_DisplayMode now includes the pixel density which can be greater than 1.0 for display modes that have a higher pixel size than the mode size. You should use SDL_GetWindowSizeInPixels() to get the actual pixel size of the window back buffer.
|
SDL_DisplayMode now includes the pixel density which can be greater than 1.0 for display modes that have a higher pixel size than the mode size. You should use SDL_GetWindowSizeInPixels() to get the actual pixel size of the window back buffer.
|
||||||
|
|
||||||
The refresh rate in SDL_DisplayMode is now a float.
|
The refresh rate in SDL_DisplayMode is now a float.
|
||||||
|
|
|
@ -475,6 +475,7 @@
|
||||||
#define SDL_SetWindowDisplayMode SDL_SetWindowFullscreenMode
|
#define SDL_SetWindowDisplayMode SDL_SetWindowFullscreenMode
|
||||||
#define SDL_WINDOW_ALLOW_HIGHDPI SDL_WINDOW_HIGH_PIXEL_DENSITY
|
#define SDL_WINDOW_ALLOW_HIGHDPI SDL_WINDOW_HIGH_PIXEL_DENSITY
|
||||||
#define SDL_WINDOW_INPUT_GRABBED SDL_WINDOW_MOUSE_GRABBED
|
#define SDL_WINDOW_INPUT_GRABBED SDL_WINDOW_MOUSE_GRABBED
|
||||||
|
#define SDL_WINDOW_SKIP_TASKBAR SDL_WINDOW_UTILITY
|
||||||
|
|
||||||
#elif !defined(SDL_DISABLE_OLD_NAMES)
|
#elif !defined(SDL_DISABLE_OLD_NAMES)
|
||||||
|
|
||||||
|
@ -912,6 +913,7 @@
|
||||||
#define SDL_SetWindowDisplayMode SDL_SetWindowDisplayMode_renamed_SDL_SetWindowFullscreenMode
|
#define SDL_SetWindowDisplayMode SDL_SetWindowDisplayMode_renamed_SDL_SetWindowFullscreenMode
|
||||||
#define SDL_WINDOW_ALLOW_HIGHDPI SDL_WINDOW_ALLOW_HIGHDPI_renamed_SDL_WINDOW_HIGH_PIXEL_DENSITY
|
#define SDL_WINDOW_ALLOW_HIGHDPI SDL_WINDOW_ALLOW_HIGHDPI_renamed_SDL_WINDOW_HIGH_PIXEL_DENSITY
|
||||||
#define SDL_WINDOW_INPUT_GRABBED SDL_WINDOW_INPUT_GRABBED_renamed_SDL_WINDOW_MOUSE_GRABBED
|
#define SDL_WINDOW_INPUT_GRABBED SDL_WINDOW_INPUT_GRABBED_renamed_SDL_WINDOW_MOUSE_GRABBED
|
||||||
|
#define SDL_WINDOW_SKIP_TASKBAR SDL_WINDOW_SKIP_TASKBAR_renamed_SDL_WINDOW_UTILITY
|
||||||
|
|
||||||
#endif /* SDL_ENABLE_OLD_NAMES */
|
#endif /* SDL_ENABLE_OLD_NAMES */
|
||||||
|
|
||||||
|
|
|
@ -144,10 +144,10 @@ typedef enum
|
||||||
SDL_WINDOW_HIGH_PIXEL_DENSITY = 0x00002000, /**< window uses high pixel density back buffer if possible */
|
SDL_WINDOW_HIGH_PIXEL_DENSITY = 0x00002000, /**< window uses high pixel density back buffer if possible */
|
||||||
SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to MOUSE_GRABBED) */
|
SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to MOUSE_GRABBED) */
|
||||||
SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
|
SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
|
||||||
SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
|
/* 0x00010000 was SDL_WINDOW_SKIP_TASKBAR in SDL2, please reserve this bit for sdl-compat */
|
||||||
SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */
|
SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window, not showing in the task bar and window list */
|
||||||
SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */
|
SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip and must be created using SDL_CreatePopupWindow() */
|
||||||
SDL_WINDOW_POPUP_MENU = 0x00080000, /**< window should be treated as a popup menu */
|
SDL_WINDOW_POPUP_MENU = 0x00080000, /**< window should be treated as a popup menu and must be created using SDL_CreatePopupWindow() */
|
||||||
SDL_WINDOW_KEYBOARD_GRABBED = 0x00100000, /**< window has grabbed keyboard input */
|
SDL_WINDOW_KEYBOARD_GRABBED = 0x00100000, /**< window has grabbed keyboard input */
|
||||||
SDL_WINDOW_VULKAN = 0x10000000, /**< window usable for Vulkan surface */
|
SDL_WINDOW_VULKAN = 0x10000000, /**< window usable for Vulkan surface */
|
||||||
SDL_WINDOW_METAL = 0x20000000, /**< window usable for Metal view */
|
SDL_WINDOW_METAL = 0x20000000, /**< window usable for Metal view */
|
||||||
|
|
|
@ -29,21 +29,43 @@ static const char *common_usage[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *video_usage[] = {
|
static const char *video_usage[] = {
|
||||||
"[--video driver]", "[--renderer driver]", "[--gldebug]", "[--display N]",
|
"[--always-on-top]",
|
||||||
|
"[--auto-scale-content]",
|
||||||
|
"[--center | --position X,Y]",
|
||||||
|
"[--confine-cursor X,Y,W,H]",
|
||||||
|
"[--depth N]",
|
||||||
|
"[--display N]",
|
||||||
|
"[--flash-on-focus-loss]",
|
||||||
|
"[--fullscreen | --fullscreen-desktop | --windows N]",
|
||||||
|
"[--geometry WxH]",
|
||||||
|
"[--gldebug]",
|
||||||
|
"[--grab]",
|
||||||
|
"[--hidden]",
|
||||||
|
"[--high-pixel-density]",
|
||||||
|
"[--icon icon.bmp]",
|
||||||
"[--info all|video|modes|render|event|event_motion]",
|
"[--info all|video|modes|render|event|event_motion]",
|
||||||
"[--metal-window | --opengl-window | --vulkan-window]",
|
"[--input-focus]",
|
||||||
"[--fullscreen | --fullscreen-desktop | --windows N]", "[--title title]",
|
"[--keyboard-grab]",
|
||||||
"[--icon icon.bmp]", "[--center | --position X,Y]", "[--geometry WxH]",
|
|
||||||
"[--min-geometry WxH]", "[--max-geometry WxH]", "[--logical WxH]",
|
|
||||||
"[--high-pixel-density]", "[--auto-scale-content]",
|
|
||||||
"[--logical-presentation disabled|match|stretch|letterbox|overscan|integer_scale]",
|
"[--logical-presentation disabled|match|stretch|letterbox|overscan|integer_scale]",
|
||||||
"[--logical-scale-quality nearest|linear|best]",
|
"[--logical-scale-quality nearest|linear|best]",
|
||||||
"[--scale N]", "[--depth N]", "[--refresh R]", "[--vsync]", "[--noframe]",
|
"[--logical WxH]",
|
||||||
"[--resizable]", "[--transparent]", "[--skip-taskbar]", "[--always-on-top]",
|
"[--max-geometry WxH]",
|
||||||
"[--minimize]", "[--maximize]", "[--grab]", "[--keyboard-grab]",
|
"[--maximize]",
|
||||||
"[--hidden]", "[--input-focus]", "[--mouse-focus]",
|
"[--metal-window | --opengl-window | --vulkan-window]",
|
||||||
"[--flash-on-focus-loss]", "[--confine-cursor X,Y,W,H]",
|
"[--min-geometry WxH]",
|
||||||
"[--usable-bounds]"
|
"[--minimize]",
|
||||||
|
"[--mouse-focus]",
|
||||||
|
"[--noframe]",
|
||||||
|
"[--refresh R]",
|
||||||
|
"[--renderer driver]",
|
||||||
|
"[--resizable]",
|
||||||
|
"[--scale N]",
|
||||||
|
"[--title title]",
|
||||||
|
"[--transparent]",
|
||||||
|
"[--usable-bounds]",
|
||||||
|
"[--utility]",
|
||||||
|
"[--video driver]",
|
||||||
|
"[--vsync]"
|
||||||
};
|
};
|
||||||
|
|
||||||
/* !!! FIXME: Float32? Sint32? */
|
/* !!! FIXME: Float32? Sint32? */
|
||||||
|
@ -525,10 +547,6 @@ int SDLTest_CommonArg(SDLTest_CommonState *state, int index)
|
||||||
state->window_flags |= SDL_WINDOW_TRANSPARENT;
|
state->window_flags |= SDL_WINDOW_TRANSPARENT;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (SDL_strcasecmp(argv[index], "--skip-taskbar") == 0) {
|
|
||||||
state->window_flags |= SDL_WINDOW_SKIP_TASKBAR;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
if (SDL_strcasecmp(argv[index], "--always-on-top") == 0) {
|
if (SDL_strcasecmp(argv[index], "--always-on-top") == 0) {
|
||||||
state->window_flags |= SDL_WINDOW_ALWAYS_ON_TOP;
|
state->window_flags |= SDL_WINDOW_ALWAYS_ON_TOP;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -565,6 +583,10 @@ int SDLTest_CommonArg(SDLTest_CommonState *state, int index)
|
||||||
state->window_flags |= SDL_WINDOW_KEYBOARD_GRABBED;
|
state->window_flags |= SDL_WINDOW_KEYBOARD_GRABBED;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if (SDL_strcasecmp(argv[index], "--utility") == 0) {
|
||||||
|
state->window_flags |= SDL_WINDOW_UTILITY;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->flags & SDL_INIT_AUDIO) {
|
if (state->flags & SDL_INIT_AUDIO) {
|
||||||
|
@ -755,9 +777,6 @@ static void SDLTest_PrintWindowFlag(char *text, size_t maxlen, Uint32 flag)
|
||||||
case SDL_WINDOW_ALWAYS_ON_TOP:
|
case SDL_WINDOW_ALWAYS_ON_TOP:
|
||||||
SDL_snprintfcat(text, maxlen, "ALWAYS_ON_TOP");
|
SDL_snprintfcat(text, maxlen, "ALWAYS_ON_TOP");
|
||||||
break;
|
break;
|
||||||
case SDL_WINDOW_SKIP_TASKBAR:
|
|
||||||
SDL_snprintfcat(text, maxlen, "SKIP_TASKBAR");
|
|
||||||
break;
|
|
||||||
case SDL_WINDOW_UTILITY:
|
case SDL_WINDOW_UTILITY:
|
||||||
SDL_snprintfcat(text, maxlen, "UTILITY");
|
SDL_snprintfcat(text, maxlen, "UTILITY");
|
||||||
break;
|
break;
|
||||||
|
@ -802,7 +821,6 @@ static void SDLTest_PrintWindowFlags(char *text, size_t maxlen, Uint32 flags)
|
||||||
SDL_WINDOW_HIGH_PIXEL_DENSITY,
|
SDL_WINDOW_HIGH_PIXEL_DENSITY,
|
||||||
SDL_WINDOW_MOUSE_CAPTURE,
|
SDL_WINDOW_MOUSE_CAPTURE,
|
||||||
SDL_WINDOW_ALWAYS_ON_TOP,
|
SDL_WINDOW_ALWAYS_ON_TOP,
|
||||||
SDL_WINDOW_SKIP_TASKBAR,
|
|
||||||
SDL_WINDOW_UTILITY,
|
SDL_WINDOW_UTILITY,
|
||||||
SDL_WINDOW_TOOLTIP,
|
SDL_WINDOW_TOOLTIP,
|
||||||
SDL_WINDOW_POPUP_MENU,
|
SDL_WINDOW_POPUP_MENU,
|
||||||
|
|
|
@ -1732,7 +1732,7 @@ Uint32 SDL_GetWindowPixelFormat(SDL_Window *window)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CREATE_FLAGS \
|
#define CREATE_FLAGS \
|
||||||
(SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIGH_PIXEL_DENSITY | SDL_WINDOW_ALWAYS_ON_TOP | SDL_WINDOW_SKIP_TASKBAR | SDL_WINDOW_POPUP_MENU | SDL_WINDOW_UTILITY | SDL_WINDOW_TOOLTIP | SDL_WINDOW_VULKAN | SDL_WINDOW_MINIMIZED | SDL_WINDOW_METAL | SDL_WINDOW_TRANSPARENT)
|
(SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIGH_PIXEL_DENSITY | SDL_WINDOW_ALWAYS_ON_TOP | SDL_WINDOW_POPUP_MENU | SDL_WINDOW_UTILITY | SDL_WINDOW_TOOLTIP | SDL_WINDOW_VULKAN | SDL_WINDOW_MINIMIZED | SDL_WINDOW_METAL | SDL_WINDOW_TRANSPARENT)
|
||||||
|
|
||||||
static SDL_INLINE SDL_bool IsAcceptingDragAndDrop(void)
|
static SDL_INLINE SDL_bool IsAcceptingDragAndDrop(void)
|
||||||
{
|
{
|
||||||
|
@ -2053,7 +2053,7 @@ SDL_Window *SDL_CreatePopupWindow(SDL_Window *parent, int offset_x, int offset_y
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove invalid flags */
|
/* Remove invalid flags */
|
||||||
flags &= ~(SDL_WINDOW_MINIMIZED | SDL_WINDOW_MAXIMIZED | SDL_WINDOW_FULLSCREEN | SDL_WINDOW_BORDERLESS | SDL_WINDOW_SKIP_TASKBAR);
|
flags &= ~(SDL_WINDOW_MINIMIZED | SDL_WINDOW_MAXIMIZED | SDL_WINDOW_FULLSCREEN | SDL_WINDOW_BORDERLESS);
|
||||||
|
|
||||||
return SDL_CreateWindowInternal(NULL, offset_x, offset_y, w, h, parent, flags);
|
return SDL_CreateWindowInternal(NULL, offset_x, offset_y, w, h, parent, flags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,6 +122,8 @@ static DWORD GetWindowStyleEx(SDL_Window *window)
|
||||||
|
|
||||||
if (SDL_WINDOW_IS_POPUP(window)) {
|
if (SDL_WINDOW_IS_POPUP(window)) {
|
||||||
style = WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE;
|
style = WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE;
|
||||||
|
} else if (window->flags & SDL_WINDOW_UTILITY) {
|
||||||
|
style = WS_EX_TOOLWINDOW;
|
||||||
}
|
}
|
||||||
return style;
|
return style;
|
||||||
}
|
}
|
||||||
|
@ -532,7 +534,7 @@ int WIN_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window)
|
||||||
|
|
||||||
if (SDL_WINDOW_IS_POPUP(window)) {
|
if (SDL_WINDOW_IS_POPUP(window)) {
|
||||||
parent = window->parent->driverdata->hwnd;
|
parent = window->parent->driverdata->hwnd;
|
||||||
} else if (window->flags & SDL_WINDOW_SKIP_TASKBAR) {
|
} else if (window->flags & SDL_WINDOW_UTILITY) {
|
||||||
parent = CreateWindow(SDL_Appname, TEXT(""), STYLE_BASIC, 0, 0, 32, 32, NULL, NULL, SDL_Instance, NULL);
|
parent = CreateWindow(SDL_Appname, TEXT(""), STYLE_BASIC, 0, 0, 32, 32, NULL, NULL, SDL_Instance, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,10 +140,6 @@ void X11_SetNetWMState(SDL_VideoDevice *_this, Window xwindow, Uint32 flags)
|
||||||
if (flags & SDL_WINDOW_ALWAYS_ON_TOP) {
|
if (flags & SDL_WINDOW_ALWAYS_ON_TOP) {
|
||||||
atoms[count++] = _NET_WM_STATE_ABOVE;
|
atoms[count++] = _NET_WM_STATE_ABOVE;
|
||||||
}
|
}
|
||||||
if (flags & SDL_WINDOW_SKIP_TASKBAR) {
|
|
||||||
atoms[count++] = _NET_WM_STATE_SKIP_TASKBAR;
|
|
||||||
atoms[count++] = _NET_WM_STATE_SKIP_PAGER;
|
|
||||||
}
|
|
||||||
if (flags & SDL_WINDOW_INPUT_FOCUS) {
|
if (flags & SDL_WINDOW_INPUT_FOCUS) {
|
||||||
atoms[count++] = _NET_WM_STATE_FOCUSED;
|
atoms[count++] = _NET_WM_STATE_FOCUSED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue