GHOST/wayland: use Wayland only when 'BLENDER_WAYLAND' is set
This commit is contained in:
parent
a2ccd0e495
commit
c971c851d3
Notes:
blender-bot
2023-12-08 16:39:08 +01:00
Referenced by commit c17a266e29
, Revert "GHOST/wayland: use Wayland only when 'BLENDER_WAYLAND' is set"
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue