diff --git a/src/ifs/xdg_activation_v1.rs b/src/ifs/xdg_activation_v1.rs index 184cf76d..b263e682 100644 --- a/src/ifs/xdg_activation_v1.rs +++ b/src/ifs/xdg_activation_v1.rs @@ -5,7 +5,7 @@ use { ifs::xdg_activation_token_v1::XdgActivationTokenV1, leaks::Tracker, object::{Object, Version}, - utils::{activation_token::ActivationToken, opaque::OpaqueError}, + utils::{activation_token::ActivationToken, errorfmt::ErrorFmt, opaque::OpaqueError}, wire::{xdg_activation_v1::*, XdgActivationV1Id}, }, std::rc::Rc, @@ -84,7 +84,13 @@ impl XdgActivationV1RequestHandler for XdgActivationV1 { } fn activate(&self, req: Activate, _slf: &Rc) -> Result<(), Self::Error> { - let token: ActivationToken = req.token.parse()?; + let token: ActivationToken = match req.token.parse() { + Ok(t) => t, + Err(e) => { + log::warn!("Could not parse client activation token: {}", ErrorFmt(e)); + return Ok(()); + } + }; let surface = self.client.lookup(req.surface)?; if self.client.state.activation_tokens.remove(&token).is_none() { log::warn!( diff --git a/toml-config/src/lib.rs b/toml-config/src/lib.rs index 16738249..b56fe396 100644 --- a/toml-config/src/lib.rs +++ b/toml-config/src/lib.rs @@ -590,7 +590,7 @@ impl State { } self.persistent .seat - .bind_masked(shortcut.mask, shortcut.keysym, move || f()); + .bind_masked(shortcut.mask, shortcut.keysym, f); binds.insert(shortcut.keysym); } }