Work around Gnome 44 titlebar bug.

This commit is contained in:
Paul Chote
2023-06-16 22:18:42 +01:00
committed by Matthias Mailänder
parent 3b0415678c
commit 0369f7516d

View File

@@ -302,6 +302,11 @@ namespace OpenRA.Platforms.Default
} }
else if (windowMode == WindowMode.PseudoFullscreen) 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_SetWindowFullscreen(Window, (uint)SDL.SDL_WindowFlags.SDL_WINDOW_FULLSCREEN_DESKTOP);
SDL.SDL_SetHint(SDL.SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0"); SDL.SDL_SetHint(SDL.SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0");