Skip to content

Commit

Permalink
fix: Error 71 (Protocol error) dispatching to Wayland display; 在 Linu…
Browse files Browse the repository at this point in the history
  • Loading branch information
kingwingfly authored and zty012 committed Dec 28, 2024
1 parent 8098e3a commit c97e706
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pnpm lint-staged
pnpm lint-staged || bun lint-staged
7 changes: 7 additions & 0 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ fn read_mp3_file(path: String) -> Result<String, String> {

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
// 在 Linux 上禁用 DMA-BUF 渲染器
// 否则无法在 Linux 上运行
// 相同的bug: https://github.com/tauri-apps/tauri/issues/10702
// 解决方案来源: https://github.com/clash-verge-rev/clash-verge-rev/blob/ae5b2cfb79423c7e76a281725209b812774367fa/src-tauri/src/lib.rs#L27-L28
#[cfg(target_os = "linux")]
std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");

tauri::Builder::default()
.plugin(tauri_plugin_store::Builder::new().build())
.setup(|app| {
Expand Down

0 comments on commit c97e706

Please sign in to comment.