[Bf-blender-cvs] [13c05973e2e] wl_default2: GHOST/wayland: try Wayland only when 'BLENDER_WAYLAND' is set

Christian Rauch noreply at git.blender.org
Mon Jul 12 21:31:45 CEST 2021


Commit: 13c05973e2e53304e92b8fa910f7c831393444df
Author: Christian Rauch
Date:   Thu Jun 3 21:12:09 2021 +0100
Branches: wl_default2
https://developer.blender.org/rB13c05973e2e53304e92b8fa910f7c831393444df

GHOST/wayland: try 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 7c12bfe0306..5ef942efb59 100644
--- a/intern/ghost/intern/GHOST_ISystem.cpp
+++ b/intern/ghost/intern/GHOST_ISystem.cpp
@@ -55,11 +55,13 @@ GHOST_TSuccess GHOST_ISystem::createSystem()
     m_system = new GHOST_SystemNULL();
 #elif defined(WITH_GHOST_X11) && defined(WITH_GHOST_WAYLAND)
     /* Special case, try Wayland, fall back to X11. */
-    try {
-      m_system = new GHOST_SystemWayland();
-    }
-    catch (const std::runtime_error &) {
-      /* fallback to X11. */
+    if (std::getenv("BLENDER_WAYLAND")) {
+      try {
+        m_system = new GHOST_SystemWayland();
+      }
+      catch (const std::runtime_error &) {
+        /* fallback to X11. */
+      }
     }
     if (!m_system) {
       m_system = new GHOST_SystemX11();



More information about the Bf-blender-cvs mailing list