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

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortamasmeszaros <meszaros.q@gmail.com>2020-04-27 14:02:16 +0300
committertamasmeszaros <meszaros.q@gmail.com>2020-04-27 14:02:16 +0300
commit9fdc54bfffbcb72241a0cbaa5960ed7d15f36c0b (patch)
tree96ac5780ab8246eb4b8aa5b4e6f0779d8f8b0412 /src
parentbf2a10803e8c90a278d4e6d5b9fd75383aa23679 (diff)
Fix app crash on startup under Linux/GTK3/Wayland config
Diffstat (limited to 'src')
-rw-r--r--src/PrusaSlicer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp
index 751df6fbf..9efecb50c 100644
--- a/src/PrusaSlicer.cpp
+++ b/src/PrusaSlicer.cpp
@@ -57,6 +57,14 @@ using namespace Slic3r;
int CLI::run(int argc, char **argv)
{
+
+#ifdef __WXGTK__
+ // On Linux, wxGTK has no support for Wayland, and the app crashes on
+ // startup if gtk3 is used. This env var has to be set explicitly to
+ // instruct the window manager to fall back to X server mode.
+ ::setenv("GDK_BACKEND", "x11", /* replace */ true);
+#endif
+
// Switch boost::filesystem to utf8.
try {
boost::nowide::nowide_filesystem();