fix overview entrance animation

This commit is contained in:
Samuel Onoja committed 2026-10-04 07:53:34 +01:00
1 parent d75c93db85
commit c1801e1f07
6 files changed
+319 -43

No files matched your search

+21 -3
View File
@@ -502,7 +502,14 @@ impl Ferese {
true
}
pub(super) fn update_workspace_slide(
pub(crate) fn workspace_slide_workspaces(&self, output: OutputId) -> impl Iterator<Item = WorkspaceId> + '_ {
self.workspace_slides
.get(&output)
.into_iter()
.flat_map(|slide| slide.items.iter().map(|item| item.workspace))
}
pub(crate) fn update_workspace_slide(
&mut self,
requested_output: OutputId,
owner: OutputId,
@@ -539,7 +546,13 @@ impl Ferese {
.collect::<Vec<_>>();
let from = ids.iter().position(|id| *id == from)?;
let to = ids.iter().position(|id| *id == workspace)?;
Some(if to > from {
Some(if self.overview.is_active() {
if to > from {
SwipeDirection::Left
} else {
SwipeDirection::Right
}
} else if to > from {
SwipeDirection::Up
} else {
SwipeDirection::Down
@@ -549,10 +562,15 @@ impl Ferese {
&& let (Some(from), Some(direction)) = (previous, slide_direction)
&& from != workspace
&& self.animations_enabled
&& !self.overview.is_presenting()
&& (!self.overview.is_presenting() || self.overview.is_active())
{
self.last_animation_tick = Instant::now();
let mut slide = WorkspaceSlide::new(previous_slide, from, workspace, direction);
slide.speed = if self.overview.is_active() {
crate::overview::OVERVIEW_MOTION_SPEED
} else {
1.0
};
slide.spring = SpringConfig {
position_tolerance: 0.00001,
velocity_tolerance: 0.00001,