Closed 0x5a4 closed 3 weeks ago
Does it reproduce using the built-in wl-copy/wl-paste binaries? What about the same binaries from wl-clipboard (the C one, not -rs)?
Exact same behaviour with the -rs wl-copy/wl-paste binaries. The output from wl-paste I posted is the C one btw.
One thing i forgot to mention that makes this even weirder is that when trying to paste something from wl-clipboard-rs, the clipboard gets cleared...
Im using the code samples from the readme.
Could you test with the original C wl-copy/paste, if they reproduce the issue?
They do
Then it's a compositor bug
I've also been suspecting that, hyprland has been quite unreliable since 0.40...
But when i copy something using the rust wl-copy, C wl-paste can read it just fine. This feels like a problem with the examples then?
Could you test with the original C wl-copy/paste, if they reproduce the issue?
Did you mean just copy pasting with them in general? Because that works.
They also have the issue with not being able to read what wl-clipboard-rs copied
I mean, if there's a problem that wl-copy copies something that then cannot be pasted in other programs, and this problem reproduces with both -rs and C wl-copy, then it's a compositor bug. If it only reproduces with the -rs wl-copy but not the C one, I'll need WAYLAND_DEBUG from both when attempting copy and (broken) paste.
The problem doesnt occur when copying with wl-copy (both Rust and C). It does however occur when using the example from the README (or through arboard, which is how i originally found this).
Code:
use wl_clipboard_rs::copy::{MimeType, Options, Source};
fn main(){
let opts = Options::new(); opts.copy(
Source::Bytes("Hello world!".to_string().into_bytes().into()),
MimeType::Autodetect,
)
.unwrap();
}
WL_DEBUG from this program and running C wl-paste afterwards is already included in the Issue description.
Ah, I see. You need to keep the program running to actually serve the paste requests. This is how the clipboard works on Wayland and X11.
Ah, thats interesting. But how does wl-copy work then? It doesnt seem to keep running after i copy something and yet i can still paste it
Ah, just looked at the source. Thanks for helping me!
I'm trying to copy some text into the clipboard and am experiencing some quite weird behaviour. wl-clipboard-rs
Im on hyprland-0.41.2, wl-clipboard-rs-0.9.0
WAYLAND_DEBUG of setting the clipboard contents
running wl-paste afterwards