Make Win32 fullscreen and borderless windows minimizable

This commit is contained in:
Jo Bates 2022-03-09 14:03:52 -08:00 committed by Sam Lantinga
parent 09b652b70a
commit 01d38e7ade
1 changed files with 5 additions and 4 deletions

View File

@ -51,16 +51,17 @@ static const TCHAR *SDL_HelperWindowClassName = TEXT("SDLHelperWindowInputCatche
static const TCHAR *SDL_HelperWindowName = TEXT("SDLHelperWindowInputMsgWindow");
static ATOM SDL_HelperWindowClass = 0;
/* For borderless Windows, still want the following flags:
/* 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.
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
- WS_MINIMIZEBOX: window will respond to Windows minimize commands sent to all windows, such as windows key + m, shaking title bar, etc.
This will also cause the task bar to overlap the window and other windowed behaviors, so only use this for windows that shouldn't appear to be fullscreen
*/
#define STYLE_BASIC (WS_CLIPSIBLINGS | WS_CLIPCHILDREN)
#define STYLE_FULLSCREEN (WS_POPUP)
#define STYLE_BORDERLESS (WS_POPUP)
#define STYLE_FULLSCREEN (WS_POPUP | WS_MINIMIZEBOX)
#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)