Introduce Kind in core::clipboard

This commit is contained in:
Héctor Ramón Jiménez 2024-02-13 03:14:08 +01:00
parent 4155edab8d
commit 508b3fe1f1
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
9 changed files with 97 additions and 130 deletions

View file

@ -876,27 +876,15 @@ fn run_command<A, C, E>(
runtime.run(Box::pin(stream));
}
command::Action::Clipboard(action) => match action {
clipboard::Action::Read(tag) => {
let message = tag(clipboard.read());
clipboard::Action::Read(tag, kind) => {
let message = tag(clipboard.read(kind));
proxy
.send_event(message)
.expect("Send message to event loop");
}
clipboard::Action::Write(contents) => {
clipboard.write(contents);
}
},
command::Action::ClipboardPrimary(action) => match action {
clipboard::Action::Read(tag) => {
let message = tag(clipboard.read_primary());
proxy
.send_event(message)
.expect("Send message to event loop");
}
clipboard::Action::Write(contents) => {
clipboard.write_primary(contents);
clipboard::Action::Write(contents, kind) => {
clipboard.write(kind, contents);
}
},
command::Action::Window(action) => match action {