api: add ActivationToken::{from,into}_raw
This is needed when passing and getting token from the IPC to activate the window.
This commit is contained in:
parent
927deb030f
commit
5462f27dda
7 changed files with 35 additions and 11 deletions
|
|
@ -65,9 +65,9 @@ impl EventLoopExtStartupNotify for dyn ActiveEventLoop + '_ {
|
|||
let _is_wayland = self.is_wayland();
|
||||
|
||||
if _is_wayland {
|
||||
env::var(WAYLAND_VAR).ok().map(ActivationToken::_new)
|
||||
env::var(WAYLAND_VAR).ok().map(ActivationToken::from_raw)
|
||||
} else {
|
||||
env::var(X11_VAR).ok().map(ActivationToken::_new)
|
||||
env::var(X11_VAR).ok().map(ActivationToken::from_raw)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -111,6 +111,6 @@ pub fn reset_activation_token_env() {
|
|||
///
|
||||
/// This could be used before running daemon processes.
|
||||
pub fn set_activation_token_env(token: ActivationToken) {
|
||||
env::set_var(X11_VAR, &token._token);
|
||||
env::set_var(WAYLAND_VAR, token._token);
|
||||
env::set_var(X11_VAR, &token.token);
|
||||
env::set_var(WAYLAND_VAR, token.token);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue