diff --git a/src/shell/focus/mod.rs b/src/shell/focus/mod.rs index 311faf8b..582a9c81 100644 --- a/src/shell/focus/mod.rs +++ b/src/shell/focus/mod.rs @@ -29,7 +29,7 @@ use super::{SeatExt, grabs::SeatMoveGrabState, layout::floating::FloatingLayout} mod order; pub mod target; -#[derive(Debug, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum FocusTarget { Window(CosmicMapped), Fullscreen(CosmicSurface), @@ -59,6 +59,15 @@ impl indexmap::Equivalent for CosmicSurface { } } +impl Hash for FocusTarget { + fn hash(&self, state: &mut H) { + match self { + FocusTarget::Window(window) => window.hash(state), + FocusTarget::Fullscreen(surface) => surface.hash(state), + } + } +} + impl From for FocusTarget { fn from(value: CosmicMapped) -> Self { Self::Window(value)