superslicer-prerelease/0001-wxgtk3-is-broken-on-wayland.patch

22 lines
491 B
Diff
Raw Permalink Normal View History

2020-04-03 00:16:54 +00:00
diff --git a/src/slic3r/GUI/GUI.cpp b/src/slic3r/GUI/GUI.cpp
index 4e85967a5..f141aabb5 100644
--- a/src/slic3r/GUI/GUI.cpp
+++ b/src/slic3r/GUI/GUI.cpp
@@ -35,6 +35,16 @@
namespace Slic3r { namespace GUI {
+// wxgtk3 is broken on wayland: https://trac.wxwidgets.org/ticket/17702
+#ifdef __WXGTK3__
+struct ForceX11 {
+ ForceX11() {
+ setenv("GDK_BACKEND", "x11", 1);
+ }
+};
+static struct ForceX11 forcex11;
+#endif
+
#if __APPLE__
IOPMAssertionID assertionID;
#endif