diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 0f2d3b1..2c298d4 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -4,6 +4,21 @@ use std::env; fn main() { + // Wayland workarounds for Linux + // https://github.com/tauri-apps/tauri/issues/10702 + #[cfg(target_os = "linux")] + { + // Check if running on Wayland + if let Ok(session_type) = env::var("XDG_SESSION_TYPE") { + if session_type.to_lowercase() == "wayland" { + unsafe { + // env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1"); + env::set_var("__NV_DISABLE_EXPLICIT_SYNC", "1"); + } + } + } + } + let args: Vec = env::args().collect(); if args.len() > 1 && args[1] == "--generate-bindings" { diff --git a/test.html b/test.html new file mode 100644 index 0000000..e110de3 --- /dev/null +++ b/test.html @@ -0,0 +1,36 @@ + + + + Test + + + +

WebKitGTK Rendering Test

+
+

If you can see this text with styled colors and layout, WebKitGTK rendering is working!

+

JavaScript: Testing...

+
+ + +