From 0369f7516d18c5c4640871fda39cfb051ee36bab Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 16 Jun 2023 22:18:42 +0100 Subject: [PATCH] Work around Gnome 44 titlebar bug. --- OpenRA.Platforms.Default/Sdl2PlatformWindow.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenRA.Platforms.Default/Sdl2PlatformWindow.cs b/OpenRA.Platforms.Default/Sdl2PlatformWindow.cs index 11a4bc2c89..00affa0e6c 100644 --- a/OpenRA.Platforms.Default/Sdl2PlatformWindow.cs +++ b/OpenRA.Platforms.Default/Sdl2PlatformWindow.cs @@ -302,6 +302,11 @@ namespace OpenRA.Platforms.Default } else if (windowMode == WindowMode.PseudoFullscreen) { + // Gnome >= 44 does not consider SDL_WINDOW_FULLSCREEN_DESKTOP to be borderless! + // This must be called before SetWindowFullscreen for the workaround to function. + if (Platform.CurrentPlatform == PlatformType.Linux) + SDL.SDL_SetWindowBordered(Window, SDL.SDL_bool.SDL_FALSE); + SDL.SDL_SetWindowFullscreen(Window, (uint)SDL.SDL_WindowFlags.SDL_WINDOW_FULLSCREEN_DESKTOP); SDL.SDL_SetHint(SDL.SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0");