Add platform::startup_notify for Wayland/X11
The utils in this module should help the users to activate the windows they create, as well as manage activation tokens environment variables. The API is essential for Wayland in the first place, since some compositors may decide initial focus of the window based on whether the activation token was during the window creation. Fixes #2279. Co-authored-by: John Nunley <jtnunley01@gmail.com>
This commit is contained in:
parent
89aa7cc06e
commit
f7a84a5b50
17 changed files with 771 additions and 35 deletions
|
|
@ -1564,3 +1564,17 @@ impl Default for ImePurpose {
|
|||
Self::Normal
|
||||
}
|
||||
}
|
||||
|
||||
/// An opaque token used to activate the [`Window`].
|
||||
///
|
||||
/// [`Window`]: crate::window::Window
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub struct ActivationToken {
|
||||
pub(crate) _token: String,
|
||||
}
|
||||
|
||||
impl ActivationToken {
|
||||
pub(crate) fn _new(_token: String) -> Self {
|
||||
Self { _token }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue