Skip to content

Commit 3f2f396

Browse files
authored
fix(desktop): enable arboard Wayland backend so Linux copies reach the Wayland clipboard (#2904)
Fixes #2896 **Root cause:** `arboard = "3"` compiles with default features only (`image-data`), so the Linux build has no Wayland backend. In a Wayland session every copy lands on the XWayland clipboard; the compositor only mirrors X11 selections while an XWayland window holds focus, and arboard's clipboard client is windowless, so Wayland-native apps read nothing. `set_text` still returns `Ok`, which is why the invite dialog shows "Copied" with an empty clipboard. **Fix:** enable arboard's `wayland-data-control` feature. Under Wayland it uses the `zwlr-data-control` protocol; when `WAYLAND_DISPLAY` is absent it falls back to X11 as before. The `wl-clipboard-rs` dependency is target-gated inside arboard, so macOS and Windows builds are unchanged. **Verified:** `cargo check` passes on the desktop crate; wl-clipboard-rs now resolves in the lockfile. Signed-off-by: Shawn Yeager <[email protected]>
1 parent c9607bd commit 3f2f396

2 files changed

Lines changed: 131 additions & 2 deletions

File tree

‎desktop/src-tauri/Cargo.lock‎

Lines changed: 126 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎desktop/src-tauri/Cargo.toml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ tauri-plugin-global-shortcut = "2"
107107
tauri-plugin-notification = "2.3.3"
108108
uuid = { version = "1", features = ["v4", "v5"] }
109109
png = "0.18"
110-
arboard = "3"
110+
# wayland-data-control: without it arboard is X11-only on Linux, so copies made
111+
# in a Wayland session land in XWayland's clipboard where Wayland-native apps
112+
# never see them (set_text still returns Ok). The backing wl-clipboard-rs dep is
113+
# target-gated inside arboard; at runtime X11 sessions still fall back to X11.
114+
arboard = { version = "3", features = ["wayland-data-control"] }
111115
image = { version = "0.25", default-features = false, features = ["jpeg", "png", "webp", "gif"] }
112116
zip = "8"
113117
flate2 = "1"

0 commit comments

Comments
 (0)