From 3fdf7426bbf7eae135ac1cb6eabeacfdde51d45e Mon Sep 17 00:00:00 2001 From: Yuzu Date: Sat, 8 Nov 2025 20:27:32 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Not=20launching=20on=20Wa?= =?UTF-8?q?yland=20(workaround)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/main.rs | 15 +++++++++++++++ test.html | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 test.html 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...

+
+ + +