diff options
author | 2022-12-10 01:42:51 +1300 | |
---|---|---|
committer | 2023-02-17 13:17:59 +0100 | |
commit | d1d13f6f160af73e549e2c2dd8a9d7991f10f1f6 (patch) | |
tree | 6adcc903ffc30c357b9913bd396adcc3c0674c38 /native | |
parent | 871f59f3be640acc8ce2760108a73b8ada846df1 (diff) | |
download | iced-d1d13f6f160af73e549e2c2dd8a9d7991f10f1f6.tar.gz iced-d1d13f6f160af73e549e2c2dd8a9d7991f10f1f6.tar.bz2 iced-d1d13f6f160af73e549e2c2dd8a9d7991f10f1f6.zip |
add always on top action
Diffstat (limited to 'native')
-rw-r--r-- | native/src/window/action.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/native/src/window/action.rs b/native/src/window/action.rs index 168974bc..b16b7243 100644 --- a/native/src/window/action.rs +++ b/native/src/window/action.rs @@ -70,6 +70,12 @@ pub enum Action<T> { /// /// - **Web / Wayland:** Unsupported. GainFocus, + /// Change whether or not the window will always be on top of other windows. + /// + /// ## Platform-specific + /// + /// - **iOS / Android / Web / Wayland:** Unsupported. + AlwaysOnTop(bool), } impl<T> Action<T> { @@ -96,6 +102,7 @@ impl<T> Action<T> { Action::RequestUserAttention(attention_type) } Self::GainFocus => Action::GainFocus, + Self::AlwaysOnTop(bool) => Action::AlwaysOnTop(bool), } } } @@ -122,6 +129,9 @@ impl<T> fmt::Debug for Action<T> { write!(f, "Action::RequestUserAttention") } Self::GainFocus => write!(f, "Action::GainFocus"), + Self::AlwaysOnTop(value) => { + write!(f, "Action::AlwaysOnTop({})", value) + } } } } |