fix(desktop): enable arboard wayland-data-control so copy works on Wayland#2922
Closed
leesalminen wants to merge 1 commit into
Closed
fix(desktop): enable arboard wayland-data-control so copy works on Wayland#2922leesalminen wants to merge 1 commit into
leesalminen wants to merge 1 commit into
Conversation
…yland
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 block#2896
Contributor
Author
|
Closing as a duplicate — #2904 got there first and has merged. Same one-line fix; I searched open issues before filing and missed the open PR, my mistake. The measurements I posted on #2896 (zero One thing from that testing worth carrying forward: the failure wasn't limited to the invite dialog — it hit everything routed through |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2896.
What's broken
Every native copy in the desktop app — invite links, message text, pubkeys — reports success and leaves the clipboard empty on a Wayland session.
Why
arboardonly compiles its Wayland backend when thewayland-data-controlfeature is enabled. Without it the Linux build has just 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_textreturnsOkagainst a clipboard nothing can read — and the write clears the real one, which is why the paste comes back empty rather than stale.That
Okis what makes it silent:InviteLinkSection.handleCopyflips to the "Copied" check state and fires the success toast, and no error toast ever appears.Evidence
Measured on Arch Linux / Hyprland against the 0.4.26 release binary:
Same probe against a build with this patch: 15 matches for
zwlr_data_control_manager_v1, andwl-pastereturns the text.The change
One dependency line, declared in the
cfg(target_os = "linux")section so the feature unifies onto the existing[dependencies]entry without touching macOS or Windows builds.No code changes are needed:
ClipboardStatealready holds thearboard::Clipboardfor the process lifetime, so the data-control backend has a live owner to serve the selection from.Testing
Built
tauri build --no-bundleand running it as my daily driver on Hyprland. Copy buttons that silently no-op'd on the stock 0.4.26 binary now land text on the clipboard.Reviewers on macOS/Windows: worth confirming the feature-unification doesn't perturb your dependency tree — it shouldn't,
wl-clipboard-rsis already target-gated inside arboard.