diff --git a/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml b/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml index ef4ff42c60..a63a584e70 100644 --- a/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml +++ b/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml @@ -16,7 +16,7 @@ build-options: LDFLAGS: "-fuse-ld=lld" finish-args: - --share=ipc - - --socket=x11 + - --socket=fallback-x11 - --socket=wayland - --share=network - --device=all diff --git a/src/OrcaSlicer.cpp b/src/OrcaSlicer.cpp index 72b6775e55..271759b5e3 100644 --- a/src/OrcaSlicer.cpp +++ b/src/OrcaSlicer.cpp @@ -1267,15 +1267,15 @@ int CLI::run(int argc, char **argv) } #endif - // WebKit2GTK compositing can fail under XWayland on older - // WebKit releases. Disable it only when both DISPLAY and - // WAYLAND_DISPLAY are set (i.e. an XWayland session is in - // use). On pure X11 or native Wayland, compositing is left - // enabled so WebKit retains HW acceleration. + // WebKit2GTK accelerated compositing is unreliable on Wayland: we + // observed blank/garbled web views (Home/Device) with both NVIDIA + // and AMD drivers. Disable it whenever WAYLAND_DISPLAY is set + // (covers native Wayland and XWayland); must happen before the first + // web view is created. Pure X11 (DISPLAY only, no WAYLAND_DISPLAY) + // and the GDK_BACKEND=x11 opt-in path above keep it enabled. { - const char* display_env_wk = ::getenv("DISPLAY"); const char* wayland_env_wk = ::getenv("WAYLAND_DISPLAY"); - if (display_env_wk && *display_env_wk && wayland_env_wk && *wayland_env_wk) { + if (wayland_env_wk && *wayland_env_wk) { ::setenv("WEBKIT_DISABLE_COMPOSITING_MODE", "1", /* replace */ false); } }