mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
Respect the SDL_BORDERLESS_RESIZABLE_STYLE hint, but default it to true.
This commit is contained in:
@@ -143,6 +143,7 @@ static ATOM SDL_HelperWindowClass = 0;
|
||||
|
||||
/* For borderless Windows, still want the following flag:
|
||||
- WS_MINIMIZEBOX: window will respond to Windows minimize commands sent to all windows, such as windows key + m, shaking title bar, etc.
|
||||
- WS_MAXIMIZEBOX: window will respond to Windows maximize commands sent to all windows, and the window will fill the usable desktop area rather than the whole screen
|
||||
Additionally, non-fullscreen windows can add:
|
||||
- WS_CAPTION: this seems to enable the Windows minimize animation
|
||||
- WS_SYSMENU: enables system context menu on task bar
|
||||
@@ -152,8 +153,8 @@ static ATOM SDL_HelperWindowClass = 0;
|
||||
|
||||
#define STYLE_BASIC (WS_CLIPSIBLINGS | WS_CLIPCHILDREN)
|
||||
#define STYLE_FULLSCREEN (WS_POPUP | WS_MINIMIZEBOX)
|
||||
#define STYLE_BORDERLESS (WS_POPUP | WS_MINIMIZEBOX | WS_THICKFRAME)
|
||||
#define STYLE_BORDERLESS_WINDOWED (WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_THICKFRAME)
|
||||
#define STYLE_BORDERLESS (WS_POPUP | WS_MINIMIZEBOX)
|
||||
#define STYLE_BORDERLESS_WINDOWED (WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX)
|
||||
#define STYLE_NORMAL (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX)
|
||||
#define STYLE_RESIZABLE (WS_THICKFRAME | WS_MAXIMIZEBOX)
|
||||
#define STYLE_MASK (STYLE_FULLSCREEN | STYLE_BORDERLESS | STYLE_NORMAL | STYLE_RESIZABLE)
|
||||
@@ -189,7 +190,7 @@ static DWORD GetWindowStyle(SDL_Window *window)
|
||||
see https://bugzilla.libsdl.org/show_bug.cgi?id=4466
|
||||
*/
|
||||
if (!(window->flags & SDL_WINDOW_BORDERLESS) ||
|
||||
SDL_GetHintBoolean("SDL_BORDERLESS_RESIZABLE_STYLE", false)) {
|
||||
SDL_GetHintBoolean("SDL_BORDERLESS_RESIZABLE_STYLE", true)) {
|
||||
style |= STYLE_RESIZABLE;
|
||||
} else if (window->flags & SDL_WINDOW_BORDERLESS) {
|
||||
/* Even if the resizable style hint isn't set, WS_MAXIMIZEBOX is still needed, or
|
||||
|
Reference in New Issue
Block a user