Restart animation when regaining focus
This commit is contained in:
parent
66d6710663
commit
44c0732306
1 changed files with 3 additions and 0 deletions
|
|
@ -932,6 +932,9 @@ where
|
||||||
|
|
||||||
if let Some(focus) = &mut state.is_focused {
|
if let Some(focus) = &mut state.is_focused {
|
||||||
focus.is_window_focused = true;
|
focus.is_window_focused = true;
|
||||||
|
focus.updated_at = Instant::now();
|
||||||
|
|
||||||
|
shell.request_redraw(window::RedrawRequest::NextFrame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Event::Window(window::Event::RedrawRequested(now)) => {
|
Event::Window(window::Event::RedrawRequested(now)) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue