update docs and change to SetAlwaysOnTop
This commit is contained in:
parent
d1d13f6f16
commit
095ecf016b
2 changed files with 5 additions and 5 deletions
|
|
@ -74,8 +74,8 @@ pub enum Action<T> {
|
|||
///
|
||||
/// ## Platform-specific
|
||||
///
|
||||
/// - **iOS / Android / Web / Wayland:** Unsupported.
|
||||
AlwaysOnTop(bool),
|
||||
/// - **Web / Wayland:** Unsupported.
|
||||
SetAlwaysOnTop(bool),
|
||||
}
|
||||
|
||||
impl<T> Action<T> {
|
||||
|
|
@ -102,7 +102,7 @@ impl<T> Action<T> {
|
|||
Action::RequestUserAttention(attention_type)
|
||||
}
|
||||
Self::GainFocus => Action::GainFocus,
|
||||
Self::AlwaysOnTop(bool) => Action::AlwaysOnTop(bool),
|
||||
Self::SetAlwaysOnTop(bool) => Action::SetAlwaysOnTop(bool),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -129,7 +129,7 @@ impl<T> fmt::Debug for Action<T> {
|
|||
write!(f, "Action::RequestUserAttention")
|
||||
}
|
||||
Self::GainFocus => write!(f, "Action::GainFocus"),
|
||||
Self::AlwaysOnTop(value) => {
|
||||
Self::SetAlwaysOnTop(value) => {
|
||||
write!(f, "Action::AlwaysOnTop({})", value)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -788,7 +788,7 @@ pub fn run_command<A, E>(
|
|||
user_attention.map(conversion::user_attention),
|
||||
),
|
||||
window::Action::GainFocus => window.focus_window(),
|
||||
window::Action::AlwaysOnTop(value) => {
|
||||
window::Action::SetAlwaysOnTop(value) => {
|
||||
window.set_always_on_top(value)
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue