superslicer-2.5.59.2-wxgtk3-wayland-fix.patch 485 B

12345678910111213141516171819202122
  1. diff --git a/src/slic3r/GUI/GUI.cpp b/src/slic3r/GUI/GUI.cpp
  2. index ccd3cc0..be8bbe5 100644
  3. --- a/src/slic3r/GUI/GUI.cpp
  4. +++ b/src/slic3r/GUI/GUI.cpp
  5. @@ -33,6 +33,16 @@ class AppConfig;
  6. namespace GUI {
  7. +// wxgtk3 is broken on wayland: https://trac.wxwidgets.org/ticket/17702
  8. +#ifdef __WXGTK3__
  9. +struct ForceX11 {
  10. + ForceX11() {
  11. + setenv("GDK_BACKEND", "x11", 1);
  12. + }
  13. +};
  14. +static struct ForceX11 forcex11;
  15. +#endif
  16. +
  17. #if __APPLE__
  18. IOPMAssertionID assertionID;
  19. #endif