slackbuilds_ponce/games/solarus/fullscreen.patch
orbea 3207e35eff
games/solarus: Add patch.
Signed-off-by: orbea <orbea@riseup.net>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2020-10-31 11:15:43 +07:00

30 lines
998 B
Diff

From cf67a03567030893993dc2d75a2a515cada371a4 Mon Sep 17 00:00:00 2001
From: orbea <orbea@riseup.net>
Date: Fri, 23 Oct 2020 09:50:33 -0700
Subject: [PATCH] Workaround SDL_WINDOW_FULLSCREEN_DESKTOP issues.
With some window managers the fullscreen for solarus will be
lost when changing workspaces.
Setting SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 in the environment
works around this issue, but its more convenient doing it
directly in solarus.
---
src/graphics/Video.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/graphics/Video.cpp b/src/graphics/Video.cpp
index b88cdc884..dd41bf20c 100644
--- a/src/graphics/Video.cpp
+++ b/src/graphics/Video.cpp
@@ -674,6 +674,7 @@ void set_default_video_mode() {
Debug::check_assertion(context.default_video_mode != nullptr,
"Default video mode was not initialized");
+ SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0");
set_fullscreen(false);
set_video_mode(*context.default_video_mode);
}
--
GitLab