Skip to content
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

Fix reset to Poll after the event loop starts #3107

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

daxpedda
Copy link
Member

@daxpedda daxpedda commented Sep 20, 2023

#3056 introduced the possibility of setting ControlFlow before the event loop starts. This was not taken into account before #3056, therefore some code existed that assumed that it always starts with ControlFlow::Poll.

This PR corrects or removes these assumption and fixes the bug that ControlFlow is always reset to Poll after the event loop starts. As a side effect, ControlFlow is also not reset to Poll after pump events & co.

I also moved some of the set_control_flow() calls in examples and documentation up to EventLoop instead of having to call them inside run() on EventLoopWindowTarget.

Discovered in #3106.

@daxpedda daxpedda force-pushed the control-flow-reset-fix branch from 6437ddc to 322c269 Compare September 20, 2023 13:05
src/lib.rs Show resolved Hide resolved
@daxpedda daxpedda added this to the Version 0.29.0 milestone Sep 22, 2023
@kchibisov kchibisov merged commit 42c9b7e into rust-windowing:master Oct 10, 2023
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants