diff options
author | 2024-02-13 03:14:08 +0100 | |
---|---|---|
committer | 2024-02-13 03:15:21 +0100 | |
commit | 508b3fe1f1405bdb8b860d0d63e2c7adfbbd51ca (patch) | |
tree | 0419f7eb42b0647a47d71ba3615eb15ad456aa3e /winit/src/application.rs | |
parent | 4155edab8d123b767ddad67e24ca2d4c50f31ece (diff) | |
download | iced-508b3fe1f1405bdb8b860d0d63e2c7adfbbd51ca.tar.gz iced-508b3fe1f1405bdb8b860d0d63e2c7adfbbd51ca.tar.bz2 iced-508b3fe1f1405bdb8b860d0d63e2c7adfbbd51ca.zip |
Introduce `Kind` in `core::clipboard`
Diffstat (limited to 'winit/src/application.rs')
-rw-r--r-- | winit/src/application.rs | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs index 2d3ac52c..0fc67adc 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -704,27 +704,15 @@ pub fn run_command<A, C, E>( runtime.run(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 { |