diff options
author | 2024-02-07 10:40:06 +0100 | |
---|---|---|
committer | 2024-02-07 10:40:06 +0100 | |
commit | d3619b5f69e3688a9ea76b56a072e01f3ca9d9ab (patch) | |
tree | e25f711dfa6fff214d19a7d1c358f0928f2a538e /winit/src/application.rs | |
parent | 6f97b62457d924ef690d736c1aabe658f9c5778b (diff) | |
parent | 2a3778daa349043f5b69a1b264feb5f00d3dd772 (diff) | |
download | iced-d3619b5f69e3688a9ea76b56a072e01f3ca9d9ab.tar.gz iced-d3619b5f69e3688a9ea76b56a072e01f3ca9d9ab.tar.bz2 iced-d3619b5f69e3688a9ea76b56a072e01f3ca9d9ab.zip |
Merge pull request #2200 from dtzxporter/run-window-callback
Provide native window access, via "fetch_native_handle" method on window.
Diffstat (limited to 'winit/src/application.rs')
-rw-r--r-- | winit/src/application.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs index 24c98d46..6a176834 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -783,6 +783,16 @@ pub fn run_command<A, C, E>( .send_event(tag(window.id().into())) .expect("Send message to event loop"); } + window::Action::RunWithHandle(_id, tag) => { + use window::raw_window_handle::HasWindowHandle; + + if let Ok(handle) = window.window_handle() { + proxy + .send_event(tag(&handle)) + .expect("Send message to event loop"); + } + } + window::Action::Screenshot(_id, tag) => { let bytes = compositor.screenshot( renderer, |