mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Do not loop when animating and suspended
This commit is contained in:
parent
09ae72da05
commit
4ae9f3917a
1 changed files with 2 additions and 4 deletions
|
@ -487,9 +487,7 @@ impl Window {
|
|||
}
|
||||
Event::Suspended(suspended) => {
|
||||
self.suspended.set(suspended);
|
||||
if suspended {
|
||||
self.set_animation_state(AnimationState::Idle);
|
||||
} else {
|
||||
if !suspended {
|
||||
self.event_queue.borrow_mut().push(WindowEvent::Idle);
|
||||
}
|
||||
}
|
||||
|
@ -565,7 +563,7 @@ impl Window {
|
|||
}
|
||||
|
||||
fn is_animating(&self) -> bool {
|
||||
self.animation_state.get() == AnimationState::Animating
|
||||
self.animation_state.get() == AnimationState::Animating && !self.suspended.get()
|
||||
}
|
||||
|
||||
pub fn run<T>(&self, mut servo_callback: T) where T: FnMut() -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue