aboutsummaryrefslogtreecommitdiff
path: root/games/solarus/fullscreen.patch
blob: efc4d6a4c985ce29c1e2167479fa466fa1a49e95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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