mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
Fix constant repaint in the open overview
This commit is contained in:
+7
-3
@@ -498,6 +498,7 @@ pub enum HitType {
|
||||
enum OverviewProgress {
|
||||
Animation(Animation),
|
||||
Gesture(OverviewGesture),
|
||||
Open,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -628,6 +629,7 @@ impl OverviewProgress {
|
||||
match self {
|
||||
OverviewProgress::Animation(anim) => anim.value(),
|
||||
OverviewProgress::Gesture(gesture) => gesture.value,
|
||||
OverviewProgress::Open => 1.,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2648,9 +2650,11 @@ impl<W: LayoutElement> Layout<W> {
|
||||
}
|
||||
}
|
||||
|
||||
if !self.overview_open {
|
||||
if let Some(OverviewProgress::Animation(anim)) = &mut self.overview_progress {
|
||||
if anim.is_done() {
|
||||
if let Some(OverviewProgress::Animation(anim)) = &mut self.overview_progress {
|
||||
if anim.is_done() {
|
||||
if self.overview_open {
|
||||
self.overview_progress = Some(OverviewProgress::Open);
|
||||
} else {
|
||||
self.overview_progress = None;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,6 +282,7 @@ impl From<&super::OverviewProgress> for OverviewProgress {
|
||||
match value {
|
||||
super::OverviewProgress::Animation(anim) => Self::Animation(anim.clone()),
|
||||
super::OverviewProgress::Gesture(gesture) => Self::Value(gesture.value),
|
||||
super::OverviewProgress::Open => Self::Value(1.),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user