Don't consider gestures animating. Fixes #391

This commit is contained in:
Victoria Brekenfeld 2024-03-28 12:34:46 +01:00
parent daf669e656
commit 62e82837f7

View file

@ -257,6 +257,13 @@ impl WorkspaceDelta {
pub fn new_shortcut() -> Self { pub fn new_shortcut() -> Self {
WorkspaceDelta::Shortcut(Instant::now()) WorkspaceDelta::Shortcut(Instant::now())
} }
pub fn is_animating(&self) -> bool {
matches!(
self,
WorkspaceDelta::Shortcut(_) | WorkspaceDelta::GestureEnd(_, _)
)
}
} }
#[derive(Debug)] #[derive(Debug)]
@ -1537,11 +1544,12 @@ impl Shell {
} }
pub fn animations_going(&self) -> bool { pub fn animations_going(&self) -> bool {
self.workspaces self.workspaces.sets.values().any(|set| {
.sets set.previously_active
.values() .as_ref()
.any(|set| set.previously_active.is_some() || set.sticky_layer.animations_going()) .is_some_and(|(_, delta)| delta.is_animating())
|| !matches!(self.overview_mode, OverviewMode::None) || set.sticky_layer.animations_going()
}) || !matches!(self.overview_mode, OverviewMode::None)
|| !matches!(self.resize_mode, ResizeMode::None) || !matches!(self.resize_mode, ResizeMode::None)
|| self || self
.workspaces .workspaces