From d1d13f6f160af73e549e2c2dd8a9d7991f10f1f6 Mon Sep 17 00:00:00 2001 From: Night_Hunter Date: Sat, 10 Dec 2022 01:42:51 +1300 Subject: add always on top action --- native/src/window/action.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'native/src') 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 { /// /// - **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 Action { @@ -96,6 +102,7 @@ impl Action { Action::RequestUserAttention(attention_type) } Self::GainFocus => Action::GainFocus, + Self::AlwaysOnTop(bool) => Action::AlwaysOnTop(bool), } } } @@ -122,6 +129,9 @@ impl fmt::Debug for Action { write!(f, "Action::RequestUserAttention") } Self::GainFocus => write!(f, "Action::GainFocus"), + Self::AlwaysOnTop(value) => { + write!(f, "Action::AlwaysOnTop({})", value) + } } } } -- cgit