🐛 fix: Not launching on Wayland (workaround)

This commit is contained in:
2025-11-08 20:27:32 +07:00
parent cdeaab4e0a
commit 3fdf7426bb
2 changed files with 51 additions and 0 deletions

View File

@@ -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<String> = env::args().collect();
if args.len() > 1 && args[1] == "--generate-bindings" {