nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1commit c9282b73f3d09daff23a2603addd94605596ebe7
2Author: Robert Schiele <rschiele@gmail.com>
3Date: Thu May 8 19:16:46 2025 +0200
4
5 remove forcing GDK_BACKEND to x11
6
7 It seems the problems on Wayland from the past are removed meanwhile.
8
9diff --git a/src/CLI/GuiParams.cpp b/src/CLI/GuiParams.cpp
10index f44b91651f..41b42ff368 100644
11--- a/src/CLI/GuiParams.cpp
12+++ b/src/CLI/GuiParams.cpp
13@@ -107,9 +107,8 @@ int start_gui_with_params(GUI::GUI_InitParams& params)
14 #if !defined(_WIN32) && !defined(__APPLE__)
15 // likely some linux / unix system
16 const char* display = boost::nowide::getenv("DISPLAY");
17- // const char *wayland_display = boost::nowide::getenv("WAYLAND_DISPLAY");
18- //if (! ((display && *display) || (wayland_display && *wayland_display))) {
19- if (!(display && *display)) {
20+ const char *wayland_display = boost::nowide::getenv("WAYLAND_DISPLAY");
21+ if (! ((display && *display) || (wayland_display && *wayland_display))) {
22 // DISPLAY not set.
23 boost::nowide::cerr << "DISPLAY not set, GUI mode not available." << std::endl << std::endl;
24 print_help(false);
25@@ -141,4 +140,4 @@ int start_as_gcode_viewer(GUI::GUI_InitParams& gui_params)
26 }
27 #else // SLIC3R_GUI
28 // If there is no GUI, we shall ignore the parameters. Remove them from the list.
29-#endif // SLIC3R_GUI
30\ No newline at end of file
31+#endif // SLIC3R_GUI
32diff --git a/src/CLI/Setup.cpp b/src/CLI/Setup.cpp
33index 82e03d466d..95acdf3477 100644
34--- a/src/CLI/Setup.cpp
35+++ b/src/CLI/Setup.cpp
36@@ -212,11 +212,6 @@ static bool setup_common()
37 save_main_thread_id();
38
39 #ifdef __WXGTK__
40- // On Linux, wxGTK has no support for Wayland, and the app crashes on
41- // startup if gtk3 is used. This env var has to be set explicitly to
42- // instruct the window manager to fall back to X server mode.
43- ::setenv("GDK_BACKEND", "x11", /* replace */ true);
44-
45 // https://github.com/prusa3d/PrusaSlicer/issues/12969
46 ::setenv("WEBKIT_DISABLE_COMPOSITING_MODE", "1", /* replace */ false);
47 ::setenv("WEBKIT_DISABLE_DMABUF_RENDERER", "1", /* replace */ false);
48@@ -338,4 +333,4 @@ bool setup(Data& cli, int argc, char** argv)
49 return true;
50 }
51
52-}
53\ No newline at end of file
54+}