···11+commit c9282b73f3d09daff23a2603addd94605596ebe7
22+Author: Robert Schiele <rschiele@gmail.com>
33+Date: Thu May 8 19:16:46 2025 +0200
44+55+ remove forcing GDK_BACKEND to x11
66+77+ It seems the problems on Wayland from the past are removed meanwhile.
88+99+diff --git a/src/CLI/GuiParams.cpp b/src/CLI/GuiParams.cpp
1010+index f44b91651f..41b42ff368 100644
1111+--- a/src/CLI/GuiParams.cpp
1212++++ b/src/CLI/GuiParams.cpp
1313+@@ -107,9 +107,8 @@ int start_gui_with_params(GUI::GUI_InitParams& params)
1414+ #if !defined(_WIN32) && !defined(__APPLE__)
1515+ // likely some linux / unix system
1616+ const char* display = boost::nowide::getenv("DISPLAY");
1717+- // const char *wayland_display = boost::nowide::getenv("WAYLAND_DISPLAY");
1818+- //if (! ((display && *display) || (wayland_display && *wayland_display))) {
1919+- if (!(display && *display)) {
2020++ const char *wayland_display = boost::nowide::getenv("WAYLAND_DISPLAY");
2121++ if (! ((display && *display) || (wayland_display && *wayland_display))) {
2222+ // DISPLAY not set.
2323+ boost::nowide::cerr << "DISPLAY not set, GUI mode not available." << std::endl << std::endl;
2424+ print_help(false);
2525+@@ -141,4 +140,4 @@ int start_as_gcode_viewer(GUI::GUI_InitParams& gui_params)
2626+ }
2727+ #else // SLIC3R_GUI
2828+ // If there is no GUI, we shall ignore the parameters. Remove them from the list.
2929+-#endif // SLIC3R_GUI
3030+\ No newline at end of file
3131++#endif // SLIC3R_GUI
3232+diff --git a/src/CLI/Setup.cpp b/src/CLI/Setup.cpp
3333+index 82e03d466d..95acdf3477 100644
3434+--- a/src/CLI/Setup.cpp
3535++++ b/src/CLI/Setup.cpp
3636+@@ -212,11 +212,6 @@ static bool setup_common()
3737+ save_main_thread_id();
3838+3939+ #ifdef __WXGTK__
4040+- // On Linux, wxGTK has no support for Wayland, and the app crashes on
4141+- // startup if gtk3 is used. This env var has to be set explicitly to
4242+- // instruct the window manager to fall back to X server mode.
4343+- ::setenv("GDK_BACKEND", "x11", /* replace */ true);
4444+-
4545+ // https://github.com/prusa3d/PrusaSlicer/issues/12969
4646+ ::setenv("WEBKIT_DISABLE_COMPOSITING_MODE", "1", /* replace */ false);
4747+ ::setenv("WEBKIT_DISABLE_DMABUF_RENDERER", "1", /* replace */ false);
4848+@@ -338,4 +333,4 @@ bool setup(Data& cli, int argc, char** argv)
4949+ return true;
5050+ }
5151+5252+-}
5353+\ No newline at end of file
5454++}
+7
pkgs/applications/misc/prusa-slicer/default.nix
···7070 rev = "version_${finalAttrs.version}";
7171 };
72727373+ # only applies to prusa slicer because super-slicer overrides *all* patches
7474+ patches = [
7575+ # https://github.com/NixOS/nixpkgs/issues/415703
7676+ # https://gitlab.archlinux.org/archlinux/packaging/packages/prusa-slicer/-/merge_requests/5
7777+ ./allow_wayland.patch
7878+ ];
7979+7380 # (not applicable to super-slicer fork)
7481 postPatch = lib.optionalString (finalAttrs.pname == "prusa-slicer") (
7582 # Patch required for GCC 14, but breaks on clang