From 77758778f899494dc6cee80fab52a9e8fecd9457 Mon Sep 17 00:00:00 2001 From: Lee Salminen Date: Sat, 25 Jul 2026 16:59:01 -0600 Subject: [PATCH] fix(desktop): enable arboard wayland-data-control so copy works on Wayland MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every native copy in the app — invite links, message text, pubkeys — reports success and leaves the clipboard empty on a Wayland session. `arboard` only compiles its Wayland backend when the `wayland-data-control` feature is on. Without it the Linux build has just the X11 backend, so on Wayland it writes through XWayland, where the selection is owned by a client the compositor never surfaces to Wayland clients. `set_text` then returns Ok against a clipboard nothing can read, and the write clears the real one — which is why the UI shows "Copied" with no error toast while the paste comes back empty rather than stale. Measured on Arch/Hyprland against the 0.4.26 release binary: strings buzz-desktop | grep zwlr_data_control_manager_v1 -> 0 matches arboard set_text -> Ok arboard get_text (X11) -> "BUZZ_ARBOARD_TEST_12345" (present) wl-paste (Wayland) -> "Nothing is copied" (absent) With the feature enabled, `wl-paste` returns the text. The app already holds `ClipboardState` for the process lifetime, so the data-control backend has a live owner to serve from and no extra lifetime handling is needed. Declared in the linux target section so the feature unifies onto the existing `[dependencies]` entry without touching macOS or Windows builds. Fixes #2896 --- desktop/src-tauri/Cargo.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/desktop/src-tauri/Cargo.toml b/desktop/src-tauri/Cargo.toml index 638f0739da..62aa789135 100644 --- a/desktop/src-tauri/Cargo.toml +++ b/desktop/src-tauri/Cargo.toml @@ -40,6 +40,14 @@ keyring = { version = "3.6.3", default-features = false, features = ["sync-secre # connection is dropped, which the plugin does immediately. Default features # keep the pure-Rust zbus backend, matching the plugin (no libdbus needed). notify-rust = "4" +# Wayland clipboard support. Without this feature arboard has only the X11 +# backend, so on a Wayland session it writes through XWayland — where the +# selection is owned by a client the compositor never surfaces to Wayland +# clients. `set_text` returns Ok against a clipboard nothing can read (and +# clears the real one), which surfaces as a copy button that reports success +# and leaves the clipboard empty. Feature-unifies with the [dependencies] +# entry; other platforms are unaffected. +arboard = { version = "3", features = ["wayland-data-control"] } [target.'cfg(target_os = "macos")'.dependencies] objc2-app-kit = { version = "0.3.2", default-features = false, features = ["NSHapticFeedback"] }