Add support for primary clipboard
This commit is contained in:
parent
7615b2240c
commit
4155edab8d
7 changed files with 96 additions and 1 deletions
|
|
@ -715,6 +715,18 @@ pub fn run_command<A, C, E>(
|
|||
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);
|
||||
}
|
||||
},
|
||||
command::Action::Window(action) => match action {
|
||||
window::Action::Close(_id) => {
|
||||
*should_exit = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue