Skip to content

feat: add Wayland clipboard support#57

Open
0-don wants to merge 2 commits into
CrossCopy:v2from
0-don:wayland-support
Open

feat: add Wayland clipboard support#57
0-don wants to merge 2 commits into
CrossCopy:v2from
0-don:wayland-support

Conversation

@0-don
Copy link
Copy Markdown

@0-don 0-don commented Mar 29, 2026

Adds native Wayland clipboard support by using a clipboard-rs fork with a Wayland backend.

Changes

  • Use clipboard-rs with wayland feature for native Wayland support via wl-clipboard-rs
  • Fix panic on ClipboardRsContext::new().unwrap() with proper error handling (previously crashed with DisplayNotSet on pure Wayland sessions)

Context

On GNOME Wayland (and other pure Wayland sessions), the clipboard plugin crashes at init because clipboard-rs only has an X11 backend. This PR switches to a fork that adds runtime Wayland detection with X11 fallback.

Depends on: ChurchTao/clipboard-rs#83

Testing

  • X11: all operations work (text, html, rtf, image, files, monitoring)
  • Wayland: all operations work via data-control protocol
  • Flatpak on GNOME Wayland: no longer crashes at startup

0-don added 2 commits March 29, 2026 03:38
Use clipboard-rs fork with native Wayland backend via wl-clipboard-rs.
Replace .unwrap() with proper error handling in clipboard context init.
Replace git dependency on clipboard-rs fork with the official 0.3.4
release which includes native Wayland support via wl-clipboard-rs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant