From b4ebb3b5684dfc1cab8131ce41e4f1bcc14ce5c1 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 28 Nov 2022 09:32:39 -0800 Subject: [PATCH] Windows borderless windows interact better with the window manager This behavior more closely matches other platform where the window is borderless but still interacts with the window manager (e.g. task bar shows above it, it can be resized to fit within usable desktop area, etc.) If you want a borderless window the size of the desktop that looks like a fullscreen window, then you should use the SDL_WINDOW_FULLSCREEN_DESKTOP flag. Fixes https://github.com/libsdl-org/SDL/issues/6659 --- src/video/windows/SDL_windowswindow.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c index fa9280b71..4a8092901 100644 --- a/src/video/windows/SDL_windowswindow.c +++ b/src/video/windows/SDL_windowswindow.c @@ -79,20 +79,7 @@ GetWindowStyle(SDL_Window * window) style |= STYLE_FULLSCREEN; } else { if (window->flags & SDL_WINDOW_BORDERLESS) { - /* SDL 2.1: - This behavior more closely matches other platform where the window is borderless - but still interacts with the window manager (e.g. task bar shows above it, it can - be resized to fit within usable desktop area, etc.) so this should be the behavior - for a future SDL release. - - If you want a borderless window the size of the desktop that looks like a fullscreen - window, then you should use the SDL_WINDOW_FULLSCREEN_DESKTOP flag. - */ - if (SDL_GetHintBoolean("SDL_BORDERLESS_WINDOWED_STYLE", SDL_FALSE)) { - style |= STYLE_BORDERLESS_WINDOWED; - } else { - style |= STYLE_BORDERLESS; - } + style |= STYLE_BORDERLESS_WINDOWED; } else { style |= STYLE_NORMAL; }