-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timer example does not work correctly on current branch #3875
Comments
I've tried to debug to figure out what's wrong. In the event loop, we get a AboutToWait event, and the next_timer is about to fire so the next_timer is very low value: We set control flow to ControlFlow with a wait duration of a a few, or 0ms. But we're never woken up. |
If we set the control flow to Wait, winit will always wait even if we set the control flow later to some smaller timeout in the AboutToWait event. Wait is the default anyway in winit 0.29 so this is not required I'd say this is a bug in winit, but we can easily work it around Fix #3875
I think winit uses SetTimer and the minimum resolution of that is around 16ms ( |
Filled rust-windowing/winit#3215 |
On Windows, winit doesn't respect the set_control_flow from the AboutToWait event. This is a bug in winit, but we can easily work it around Fix #3875
On Windows, winit doesn't respect the set_control_flow from the AboutToWait event. This is a bug in winit, but we can easily work it around Fix #3875
Discussed in #3873
Originally posted by HitecExports November 7, 2023
Hello!
Platform: Windows 11
Rust 1.73
slint = { git = "https://github.com/slint-ui/slint.git", branch = "master" }
Timer example does not work properly in current slint branch
"Elapsed Time" progress bar updates only while moving mouse in any area (even outside the main window)
So timer does not fire event automatically.
I noticed this problem for a week ago.
Before there were no such problem.
On Slint 1.2.2 same Timer Example works fine
Code (copied from Timer example)
The text was updated successfully, but these errors were encountered: