From 7ef09349b6bdab3bb8863dab93b1ccda192f7ba2 Mon Sep 17 00:00:00 2001 From: Lam Wei Lun Date: Wed, 14 Oct 2026 21:51:24 +0800 Subject: [PATCH] Linux: say what the XWayland compositing gate actually tests DISPLAY and WAYLAND_DISPLAY are both set in a native Wayland session as well, because GNOME and KDE run Xwayland as part of the session and export DISPLAY for it whether or not this process is an X client. The pair means XWayland is available in the session, not that GTK picked X11 for this process, so "(an XWayland session)" reads as more than the condition establishes. Say what the pair means, and name the case the fallback actually covers: the X11 backend inside a Wayland session, which is what the forced GDK_BACKEND=x11 above produces in a build without EGL. Comment only; behaviour is unchanged. --- src/OrcaSlicer.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/OrcaSlicer.cpp b/src/OrcaSlicer.cpp index cb42d60fb9..1f003b936d 100644 --- a/src/OrcaSlicer.cpp +++ b/src/OrcaSlicer.cpp @@ -1217,9 +1217,13 @@ int CLI::run(int argc, char **argv) // WebKit2GTK accelerated compositing could fail under XWayland // on WebKit releases before 2.42. Disable it only then, and only - // when both DISPLAY and WAYLAND_DISPLAY are set (an XWayland - // session). Disabling it also turns off threaded scrolling, so on - // newer WebKit it only costs performance. + // when both DISPLAY and WAYLAND_DISPLAY are set. Those two mean the + // session offers XWayland, not that GTK picked X11 for this + // process: a native Wayland app inherits both. The default path + // runs X11 here only in a build without EGL, which is what the + // forced GDK_BACKEND=x11 above produces. Disabling compositing also + // turns off threaded scrolling, so on newer WebKit it only costs + // performance. { const char* display_env_wk = ::getenv("DISPLAY"); const char* wayland_env_wk = ::getenv("WAYLAND_DISPLAY");