fix(desktop): copy to clipboard on native Wayland sessions - #2379
Closed
ricardoraposo wants to merge 2 commits into
Closed
fix(desktop): copy to clipboard on native Wayland sessions#2379ricardoraposo wants to merge 2 commits into
ricardoraposo wants to merge 2 commits into
Conversation
arboard was built with default features, so on Linux it only spoke to the X11 clipboard (via XWayland). On a native Wayland session those writes don't reliably propagate to Wayland apps, so copy actions silently failed. Enable arboard's "wayland-data-control" feature, which pulls in wl-clipboard-rs and uses the native Wayland data-control protocol (with X11 fallback). The app already retains clipboard ownership for the process lifetime (ClipboardState), which satisfies Wayland's requirement that the source client stay alive to serve paste requests. Signed-off-by: ricardo <ricardorbxx1@gmail.com>
Signed-off-by: ricardo <ricardorbxx1@gmail.com> # Conflicts: # desktop/src-tauri/Cargo.lock
Author
|
Closing this out — #2904 landed the same fix independently (enabling arboard's |
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.
Summary
Copy-to-clipboard actions silently failed on native Wayland Linux sessions.
arboardwas declared with default features, so on Linux it only talked to the X11 clipboard (through XWayland). On a native Wayland session those writes don't reliably propagate to Wayland apps, so nothing landed in the clipboard.Fix
Enable
arboard'swayland-data-controlfeature, which pulls inwl-clipboard-rsand uses the native Waylandwlr-data-controlprotocol (with automatic X11 fallback for XWayland/X11 sessions).The app already retains clipboard ownership for the process lifetime via
ClipboardState(seedesktop/src-tauri/src/commands/clipboard.rs), which satisfies Wayland's requirement that the source client stay alive to serve paste requests — so no additional lifecycle changes were needed.Changes
desktop/src-tauri/Cargo.toml— enable thewayland-data-controlfeature onarboard.desktop/src-tauri/Cargo.lock— addswl-clipboard-rsand its wayland dependencies (12 new entries, no existing crates removed or version-bumped).Testing
Built and ran on Fedora 43 (Sway,
XDG_SESSION_TYPE=wayland):Launched the built binary, clicked a copy button, and confirmed the text was retrievable via
wl-pasteand pasteable into other Wayland apps. Before the change, the same actions produced nothing in the clipboard.