fullscreen.patch 998 B

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