diff --git a/anvil/src/window_map.rs b/anvil/src/window_map.rs index f54bda6..f98672b 100644 --- a/anvil/src/window_map.rs +++ b/anvil/src/window_map.rs @@ -19,6 +19,16 @@ pub enum Kind { Wl(ShellSurface), } +// We implement Clone manually because #[derive(..)] would require R: Clone. +impl Clone for Kind { + fn clone(&self) -> Self { + match self { + Kind::Xdg(xdg) => Kind::Xdg(xdg.clone()), + Kind::Wl(wl) => Kind::Wl(wl.clone()), + } + } +} + impl Kind where R: Role + Role + Role + 'static,