mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 22:54:36 +00:00
Fix event loop being blocked because it wouldn't notice that animation is still running
The active_animation was set to false, but if the animation tick did not change, the animation tick was not maked dirty, and we wouldn't then re-evaluate animated property that would set the active_animation to true again
This commit is contained in:
parent
c72c2a58ff
commit
e75f617125
2 changed files with 5 additions and 3 deletions
|
@ -214,6 +214,7 @@ pub(crate) fn unregister_window(id: winit::window::WindowId) {
|
|||
|
||||
/// This enum captures run-time specific events that can be dispatched to the event loop in
|
||||
/// addition to the winit events.
|
||||
#[derive(Debug)]
|
||||
pub enum CustomEvent {
|
||||
/// Request for the event loop to wake up and poll. This is used on the web for example to
|
||||
/// request an animation frame.
|
||||
|
@ -476,7 +477,6 @@ impl EventLoop {
|
|||
return;
|
||||
}
|
||||
*control_flow = ControlFlow::Poll;
|
||||
//println!("Scheduling a redraw due to active animations");
|
||||
ALL_WINDOWS.with(|windows| {
|
||||
windows.borrow().values().for_each(|window| {
|
||||
if let Some(window) = window.upgrade() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue