[Bf-blender-cvs] [9213101936d] wayland: GHOST/wayland: try Wayland only when 'BLENDER_WAYLAND' is set
Christian Rauch
noreply at git.blender.org
Tue Jul 13 00:32:02 CEST 2021
Commit: 9213101936d6aae47071c9d26f2d66fbc28036ba
Author: Christian Rauch
Date: Thu Jun 3 21:12:09 2021 +0100
Branches: wayland
https://developer.blender.org/rB9213101936d6aae47071c9d26f2d66fbc28036ba
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