From 305fc3b5576c4c6e3d899b3413dbbb8727922cfe Mon Sep 17 00:00:00 2001 From: Christian Meissl Date: Sat, 16 Nov 2024 22:35:34 +0100 Subject: Activate newly mapped windows with a valid activation token most of the time the activation token is passed while the window is still unmapped. in this case store the intend to activate the window for later retrieval on map. --- src/window/unmapped.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/window') diff --git a/src/window/unmapped.rs b/src/window/unmapped.rs index a74c4e24..98f57aad 100644 --- a/src/window/unmapped.rs +++ b/src/window/unmapped.rs @@ -1,6 +1,7 @@ use smithay::desktop::Window; use smithay::output::Output; use smithay::wayland::shell::xdg::ToplevelSurface; +use smithay::wayland::xdg_activation::XdgActivationTokenData; use super::ResolvedWindowRules; use crate::layout::workspace::ColumnWidth; @@ -9,6 +10,8 @@ use crate::layout::workspace::ColumnWidth; pub struct Unmapped { pub window: Window, pub state: InitialConfigureState, + /// Activation token, if one was used on this unmapped window. + pub activation_token_data: Option, } #[allow(clippy::large_enum_variant)] @@ -57,6 +60,7 @@ impl Unmapped { state: InitialConfigureState::NotConfigured { wants_fullscreen: None, }, + activation_token_data: None, } } -- cgit