diff --git a/Cargo.toml b/Cargo.toml index 03979fcee2..e385fc9438 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -346,12 +346,17 @@ tao = { version = "0.35.2", features = ["rwh_05"] } infer = "0.19.0" dunce = "1.0.5" percent-encoding = "2.3.2" -muda = "0.19.1" +# `libxdo` is a default feature of both `muda` and `tray-icon`. It is only used +# to make the predefined Copy/Cut/Paste/SelectAll menu items work on Linux, but +# enabling it links `libxdo.so` unconditionally into every Dioxus desktop app. +# Opt in via the `dioxus-desktop/linux-libxdo` feature instead. `gtk` is kept — +# it is what actually renders menus and tray icons on Linux. +muda = { version = "0.19.1", default-features = false, features = ["gtk"] } objc2 = { version = "0.6.4", features = ["exception"] } objc2-foundation = { version = "0.3.2", default-features = false } objc2-ui-kit = { version = "0.3.2", default-features = false } objc2-app-kit = { version = "0.3.2", default-features = false } -tray-icon = "0.24.0" +tray-icon = { version = "0.24.0", default-features = false, features = ["gtk"] } open = "5.3.5" webbrowser = "1.2.1" diff --git a/packages/desktop/Cargo.toml b/packages/desktop/Cargo.toml index 44ed73c71c..8c3c706ca4 100644 --- a/packages/desktop/Cargo.toml +++ b/packages/desktop/Cargo.toml @@ -100,6 +100,10 @@ fullscreen = ["wry/fullscreen"] devtools = ["wry/devtools", "dep:dioxus-devtools", "dioxus-signals"] transparent = ["wry/transparent"] gnu = [] +# Links `libxdo.so` on Linux, required only for the predefined Copy, Cut, Paste +# and SelectAll menu items. Off by default so apps that do not use them are not +# tied to the build machine's libxdo soname. Mirrors Tauri's `linux-libxdo`. +linux-libxdo = ["muda/libxdo", "tray-icon/libxdo"] [package.metadata.docs.rs] features = ["tokio_runtime", "devtools"]