fix: properly remove elements from the focus_stack
shift_remove could not delete the element in it's stack because indexmap::Equivalent requires the hashes to be equivalent
This commit is contained in:
parent
6025f483d6
commit
714e80366d
1 changed files with 10 additions and 1 deletions
|
|
@ -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<FocusTarget> for CosmicSurface {
|
|||
}
|
||||
}
|
||||
|
||||
impl Hash for FocusTarget {
|
||||
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
||||
match self {
|
||||
FocusTarget::Window(window) => window.hash(state),
|
||||
FocusTarget::Fullscreen(surface) => surface.hash(state),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<CosmicMapped> for FocusTarget {
|
||||
fn from(value: CosmicMapped) -> Self {
|
||||
Self::Window(value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue