Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorChristian Rauch <Rauch.Christian@gmx.de>2021-07-22 23:37:41 +0300
committerChristian Rauch <Rauch.Christian@gmx.de>2021-07-24 14:30:14 +0300
commitc971c851d38ad52779fa5d75c86bbfb83abf660b (patch)
tree57dce67a3da5b9298c4b011f2cd489e4360f16ed /intern
parenta2ccd0e495d54240f785ee425a15ba1bd2537e5a (diff)
GHOST/wayland: use Wayland only when 'BLENDER_WAYLAND' is set
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_ISystem.cpp6
1 files changed, 6 insertions, 0 deletions
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. */