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/multi_window.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/multi_window.rs')
-rw-r--r-- | winit/src/multi_window.rs | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/winit/src/multi_window.rs b/winit/src/multi_window.rs index 33f521c4..ed00abdf 100644 --- a/winit/src/multi_window.rs +++ b/winit/src/multi_window.rs @@ -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 { |