summaryrefslogtreecommitdiffstats
path: root/winit/src/multi_window.rs
diff options
context:
space:
mode:
authorLibravatar dtzxporter <dtzxporter@users.noreply.github.com>2024-01-19 14:48:14 -0500
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-07 09:35:13 +0100
commit7105992228e58566cfacb6a1d6e10ec60fb05ecf (patch)
treed67ac19c57adf9a3282e8050cec407f437b86bff /winit/src/multi_window.rs
parent6f97b62457d924ef690d736c1aabe658f9c5778b (diff)
downloadiced-7105992228e58566cfacb6a1d6e10ec60fb05ecf.tar.gz
iced-7105992228e58566cfacb6a1d6e10ec60fb05ecf.tar.bz2
iced-7105992228e58566cfacb6a1d6e10ec60fb05ecf.zip
Re-implement against latest iced master. Rename FetchNativeHandle.
Diffstat (limited to 'winit/src/multi_window.rs')
-rw-r--r--winit/src/multi_window.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/winit/src/multi_window.rs b/winit/src/multi_window.rs
index 662adf5b..1b5fe375 100644
--- a/winit/src/multi_window.rs
+++ b/winit/src/multi_window.rs
@@ -22,6 +22,8 @@ use crate::runtime::Debug;
use crate::style::application::StyleSheet;
use crate::{Clipboard, Error, Proxy, Settings};
+use winit::raw_window_handle::HasWindowHandle;
+
use std::collections::HashMap;
use std::mem::ManuallyDrop;
use std::sync::Arc;
@@ -1037,6 +1039,16 @@ fn run_command<A, C, E>(
.expect("Event loop doesn't exist.");
}
}
+ window::Action::FetchNativeHandle(id, tag) => {
+ if let Some(window) = window_manager.get_mut(id) {
+ proxy
+ .send_event(tag(&window
+ .raw
+ .window_handle()
+ .expect("Missing window handle.")))
+ .expect("Event loop doesn't exist.");
+ }
+ }
window::Action::Screenshot(id, tag) => {
if let Some(window) = window_manager.get_mut(id) {
let bytes = compositor.screenshot(