[Bf-blender-cvs] [c971c851d38] master: GHOST/wayland: use Wayland only when 'BLENDER_WAYLAND' is set

Christian Rauch noreply at git.blender.org
Sat Jul 24 13:40:22 CEST 2021


Commit: c971c851d38ad52779fa5d75c86bbfb83abf660b
Author: Christian Rauch
Date:   Thu Jul 22 21:37:41 2021 +0100
Branches: master
https://developer.blender.org/rBc971c851d38ad52779fa5d75c86bbfb83abf660b

GHOST/wayland: use Wayland only when 'BLENDER_WAYLAND' is set

===================================================================

M	intern/ghost/intern/GHOST_ISystem.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_ISystem.cpp b/intern/ghost/intern/GHOST_ISystem.cpp
index d9fecda22a4..cb85edb728b 100644
--- a/intern/ghost/intern/GHOST_ISystem.cpp
+++ b/intern/ghost/intern/GHOST_ISystem.cpp
@@ -57,6 +57,12 @@ GHOST_TSuccess GHOST_ISystem::createSystem()
     /* Special case, try Wayland, fall back to X11. */
     try {
       m_system = new GHOST_SystemWayland();
+      if (!std::getenv("BLENDER_WAYLAND")) {
+        printf("Connected to a Wayland compositor but Wayland is disabled at "\
+               "runtime.\nSet environment variable 'BLENDER_WAYLAND' (e.g. "\
+               "BLENDER_WAYLAND= blender) to use Wayland.\n");
+        throw std::runtime_error(std::string());
+      }
     }
     catch (const std::runtime_error &) {
       /* fallback to X11. */



More information about the Bf-blender-cvs mailing list