1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

Fix clipboard on Wayland (#1613)

arboard advertises that it works with Wayland, but in reality it only
works with Wayland terminal applications. To make the clipboard work
with applications that draw Wayland surfaces, arboard isn't going to
work.

Copypasta does support Wayland's graphical clipboard, but the usage
isn't documented. However, for the reasons mentioned in #1474 the move
from Copypasta to arboard makes sense.

To resolve the issue, this commit brings in an optional dependency
smithay-clipboard, that is a crate that correctly handles the Wayland
clipboard in graphical applications. It is used by default if a Wayland
window handle is found. If for some reason the handle to the Wayland
window handle cannot be fetched, arboard is used as a backup.
This commit is contained in:
Antti Keränen
2022-05-16 17:37:41 +03:00
committed by GitHub
parent b008b147e5
commit b8a5924295
4 changed files with 140 additions and 10 deletions

11
Cargo.lock generated
View File

@@ -1180,6 +1180,7 @@ dependencies = [
"instant",
"puffin",
"serde",
"smithay-clipboard",
"tracing",
"tts",
"webbrowser",
@@ -3308,6 +3309,16 @@ dependencies = [
"wayland-protocols",
]
[[package]]
name = "smithay-clipboard"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "610b551bd25378bfd2b8e7a0fcbd83d427e8f2f6a40c47ae0f70688e9949dd55"
dependencies = [
"smithay-client-toolkit",
"wayland-client",
]
[[package]]
name = "socket2"
version = "0.4.4"