wayland: Refactor clipboard implementation (#12405)

Fixes https://github.com/zed-industries/zed/issues/12054

Replaces the `copypasta`/`smithay-clipboard` implementation with a new,
custom one

TODO list:

- [x] Cleanup code
- [x] Remove `smithay-clipboard`
- [x] Add more mime types to the supported list

Release Notes:

- Fixed drag and drop on Gnome
- Fixed clipboard paste on Hyprland
This commit is contained in:
apricotbucket28 2024-06-18 14:04:19 -03:00 committed by GitHub
parent b55961b57a
commit f6fa6600bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 491 additions and 175 deletions

View file

@ -104,13 +104,12 @@ blade-macros.workspace = true
blade-util.workspace = true
bytemuck = "1"
cosmic-text = { git = "https://github.com/pop-os/cosmic-text", rev = "542b20c" }
copypasta = "0.10.1"
[target.'cfg(target_os = "linux")'.dependencies]
as-raw-xcb-connection = "1"
ashpd.workspace = true
calloop = "0.12.4"
calloop-wayland-source = "0.2.0"
calloop = "0.13.0"
calloop-wayland-source = "0.3.0"
wayland-backend = { version = "0.3.3", features = ["client_system"] }
wayland-client = { version = "0.31.2" }
wayland-cursor = "0.31.1"
@ -136,10 +135,12 @@ xim = { git = "https://github.com/npmania/xim-rs", rev = "27132caffc5b9bc9c432ca
"x11rb-xcb",
"x11rb-client",
] }
x11-clipboard = "0.9.2"
[target.'cfg(windows)'.dependencies]
windows.workspace = true
windows-core = "0.57"
clipboard-win = "3.1.1"
[target.'cfg(windows)'.build-dependencies]
embed-resource = "2.4"