gentoo-ebuilds/media-gfx/superslicer/files/superslicer-2.5.59.2-wxgtk3-wayland-fix.patch
Piotr Karbowski ac53eaadee
media-gfx/superslicer: 2.5.59.2 version bump.
Signed-off-by: Piotr Karbowski <slashbeast@gentoo.org>
2023-04-18 23:24:22 +02:00

21 lines
485 B
Diff

diff --git a/src/slic3r/GUI/GUI.cpp b/src/slic3r/GUI/GUI.cpp
index ccd3cc0..be8bbe5 100644
--- a/src/slic3r/GUI/GUI.cpp
+++ b/src/slic3r/GUI/GUI.cpp
@@ -33,6 +33,16 @@ class AppConfig;
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