From a8e8fe66dc09ed1824e550075aefda382c6da165 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Tue, 15 Sep 2026 13:45:30 +0800 Subject: [PATCH] fix(tray): patch tray-icon for macOS 27 click reentrancy Close: #7256 --- Cargo.lock | 5 ++--- Cargo.toml | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b6c53d9a4..a4981eb5c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8484,9 +8484,8 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "045979e3f037cd18ad1cb2a419dfda133c5c29c9f3453370079f2255d46c257e" +version = "0.24.1" +source = "git+https://github.com/Tunglies/tray-icon.git?branch=fix%2Fmacos-27-click-reentrancy#5750c67d02d32f2af100e120ad665959d4268cef" dependencies = [ "crossbeam-channel", "dirs 6.0.0", diff --git a/Cargo.toml b/Cargo.toml index 527258615..e9f6d71b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,6 +46,12 @@ inherits = "fast-release" codegen-units = 1 split-debuginfo = "unpacked" +[patch.crates-io] +# macOS Golden Gate fix for tray-icon click reentrancy issue +# Remove the following patch once the fix is merged upstream(tauri) +# https://github.com/tauri-apps/tray-icon/pull/365 +tray-icon = { git = "https://github.com/Tunglies/tray-icon.git", branch = "fix/macos-27-click-reentrancy" } + [workspace.dependencies] clash-verge-draft = { path = "crates/clash-verge-draft" } clash-verge-media-unlock = { path = "crates/clash-verge-media-unlock" } @@ -72,7 +78,13 @@ tokio = { version = "1.53.1", features = [ flexi_logger = "0.31.10" log = "0.4.33" regex = "1.13.1" -reqwest = { version = "0.13.4", features = ["json", "cookies", "gzip", "rustls", "form"] } +reqwest = { version = "0.13.4", features = [ + "json", + "cookies", + "gzip", + "rustls", + "form", +] } rust_iso3166 = "0.2.0" smartstring = { version = "1.0.1" } @@ -93,7 +105,7 @@ windows-sys = { version = "0.61.2", features = [ "Win32_Security_Authorization", "Win32_Storage_FileSystem", "Win32_System_Threading", - "Win32_System_JobObjects" + "Win32_System_JobObjects", ] } # *********************************