mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-11 11:07:40 +00:00
Use fallback-x11 and disable WebKit compositing on Wayland
This commit is contained in:
@@ -16,7 +16,7 @@ build-options:
|
|||||||
LDFLAGS: "-fuse-ld=lld"
|
LDFLAGS: "-fuse-ld=lld"
|
||||||
finish-args:
|
finish-args:
|
||||||
- --share=ipc
|
- --share=ipc
|
||||||
- --socket=x11
|
- --socket=fallback-x11
|
||||||
- --socket=wayland
|
- --socket=wayland
|
||||||
- --share=network
|
- --share=network
|
||||||
- --device=all
|
- --device=all
|
||||||
|
|||||||
@@ -1267,15 +1267,15 @@ int CLI::run(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// WebKit2GTK compositing can fail under XWayland on older
|
// WebKit2GTK accelerated compositing is unreliable on Wayland: we
|
||||||
// WebKit releases. Disable it only when both DISPLAY and
|
// observed blank/garbled web views (Home/Device) with both NVIDIA
|
||||||
// WAYLAND_DISPLAY are set (i.e. an XWayland session is in
|
// and AMD drivers. Disable it whenever WAYLAND_DISPLAY is set
|
||||||
// use). On pure X11 or native Wayland, compositing is left
|
// (covers native Wayland and XWayland); must happen before the first
|
||||||
// enabled so WebKit retains HW acceleration.
|
// 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");
|
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);
|
::setenv("WEBKIT_DISABLE_COMPOSITING_MODE", "1", /* replace */ false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user