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
|
|
@ -78,7 +78,7 @@ impl Dispatch<XdgActivationTokenV1, XdgActivationTokenData, WinitState> for XdgA
|
|||
state.events_sink.push_window_event(
|
||||
crate::event::WindowEvent::ActivationTokenDone {
|
||||
serial: *serial,
|
||||
token: ActivationToken::_new(token),
|
||||
token: ActivationToken::from_raw(token),
|
||||
},
|
||||
*window_id,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ impl Window {
|
|||
if let (Some(xdg_activation), Some(token)) =
|
||||
(xdg_activation.as_ref(), attributes.platform_specific.activation_token)
|
||||
{
|
||||
xdg_activation.activate(token._token, &surface);
|
||||
xdg_activation.activate(token.token, &surface);
|
||||
}
|
||||
|
||||
// XXX Do initial commit.
|
||||
|
|
|
|||
|
|
@ -532,7 +532,7 @@ impl EventLoop {
|
|||
Some(Ok(token)) => {
|
||||
let event = WindowEvent::ActivationTokenDone {
|
||||
serial,
|
||||
token: crate::window::ActivationToken::_new(token),
|
||||
token: crate::window::ActivationToken::from_raw(token),
|
||||
};
|
||||
app.window_event(&self.event_processor.target, window_id, event);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -880,7 +880,7 @@ impl UnownedWindow {
|
|||
|
||||
// Remove the startup notification if we have one.
|
||||
if let Some(startup) = window_attrs.platform_specific.activation_token.as_ref() {
|
||||
leap!(xconn.remove_activation_token(xwindow, &startup._token));
|
||||
leap!(xconn.remove_activation_token(xwindow, &startup.token));
|
||||
}
|
||||
|
||||
// We never want to give the user a broken window, since by then, it's too late to handle.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue