diff options
| author | 2023-02-17 11:50:52 -0800 | |
|---|---|---|
| committer | 2023-02-17 13:01:40 -0800 | |
| commit | 2d427455ce8f9627da7c09eb80f38a615f0ddcb7 (patch) | |
| tree | 37b3446cd382bdd6f6949032c4318a8fba071cb6 /glutin/src | |
| parent | 744cef5608a91fe55cbbe1adb73a9a0b5e266668 (diff) | |
| download | iced-2d427455ce8f9627da7c09eb80f38a615f0ddcb7.tar.gz iced-2d427455ce8f9627da7c09eb80f38a615f0ddcb7.tar.bz2 iced-2d427455ce8f9627da7c09eb80f38a615f0ddcb7.zip | |
Iced master merge (again)
Diffstat (limited to '')
| -rw-r--r-- | glutin/src/multi_window.rs | 18 | 
1 files changed, 14 insertions, 4 deletions
| diff --git a/glutin/src/multi_window.rs b/glutin/src/multi_window.rs index da450dee..620d01d8 100644 --- a/glutin/src/multi_window.rs +++ b/glutin/src/multi_window.rs @@ -25,16 +25,15 @@ use glutin::surface::{GlSurface, SwapInterval};  use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle};  use crate::application::gl_surface; -use iced_native::window::Action;  use iced_winit::multi_window::Event;  use std::collections::HashMap;  use std::ffi::CString;  use std::mem::ManuallyDrop;  use std::num::NonZeroU32; +use iced_native::widget::operation;  #[cfg(feature = "tracing")]  use tracing::{info_span, instrument::Instrument}; -use iced_native::widget::operation;  #[allow(unsafe_code)]  const ONE: NonZeroU32 = unsafe { NonZeroU32::new_unchecked(1) }; @@ -937,16 +936,27 @@ pub fn run_command<A, E>(                      let window = windows.get(&id).expect("No window found!");                      window.set_decorations(!window.is_decorated());                  } -                Action::RequestUserAttention(attention_type) => { +                window::Action::RequestUserAttention(attention_type) => {                      let window = windows.get(&id).expect("No window found!");                      window.request_user_attention(                          attention_type.map(conversion::user_attention),                      );                  } -                Action::GainFocus => { +                window::Action::GainFocus => {                      let window = windows.get(&id).expect("No window found!");                      window.focus_window();                  } +                window::Action::ChangeAlwaysOnTop(on_top) => { +                    let window = windows.get(&id).expect("No window found!"); +                    window.set_always_on_top(on_top); +                } +                window::Action::FetchId(tag) => { +                    let window = windows.get(&id).expect("No window found!"); + +                    proxy +                        .send_event(Event::Application(tag(window.id().into()))) +                        .expect("Send message to event loop.") +                }              },              command::Action::System(action) => match action {                  system::Action::QueryInformation(_tag) => { | 
